classpath-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cp-patches] RFC: 2 swing.text.Utilities methods implemented


From: Roman Kennke
Subject: Re: [cp-patches] RFC: 2 swing.text.Utilities methods implemented
Date: Tue, 27 Sep 2005 15:13:28 +0200

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

Attachment: signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil


reply via email to

[Prev in Thread] Current Thread [Next in Thread]