classpath-patches
[Top][All Lists]
Advanced

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

[cp-patches] Re: FYI: PlainView update partially fixes bug 24152


From: Anthony Balkissoon
Subject: [cp-patches] Re: FYI: PlainView update partially fixes bug 24152
Date: Mon, 03 Oct 2005 16:14:06 -0400

Forgot to attach the patch.

--Tony

On Mon, 2005-10-03 at 16:07 -0400, Anthony Balkissoon wrote:
> This fix for PlainView solves one of the problems that was leading to
> bug 24152, but it is not done yet.
> 
> The bug report is viewable here:
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24152
> 
> This caches the length of the longest line in the View so that it
> doesn't have to be calculated each time.
> 
> However, we need to add a way to update this when the Document changes,
> I think it might be through the updateDamaged method and a
> DocumentListener, but I'm not 100% sure, I'm still working through it.
> 
> This change leads to significantly better results than posted in the bug
> report.  However, the very first time the text is shown there is still a
> huge delay, and this will again be fixed if we can update the longest
> line whenever the Document is updated, then we'll have it calculated as
> soon as it was initialized with some text.  So this is still a work in
> progress.
> 
> 
> 2005-10-03  Anthony Balkissoon  <address@hidden>
> 
>       * javax/swing/text/PlainView.java:
>       (maxLineLength): New variable to cache the length of the longest line.
>       (determineMaxLength): New implementation method.
>       (getPreferredSpan): Call determine max length instead of calculating
>       it here.
> 
> --Tony

Attachment: PlainViewCacheLongest.diff
Description: Text Data


reply via email to

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