Hi Tony, Am Montag, den 26.09.2005, 16:34 -0400 schrieb Anthony Balkissoon: > I implemented getRowStart and getRowEnd in javax.swing.text.Utilities. > This is RFC because of the issue raised in the large comment in each of > this methods (namely, performance). Some comments would be appreciated.
I would recommend something like a binary search. That means, start with the full text (offset to end) and then try at the middle of this segment. If the half segment is shorter than the line, then search on in the upper half (3/4), otherwise search on in the lower half (1/4). This way the end of the line could be found pretty quickly. /Roman
signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil
_______________________________________________ Classpath-patches mailing list [email protected] http://lists.gnu.org/mailman/listinfo/classpath-patches
