Bug 19677 - Syntax highlighting JavaScript needs to be lazy
Summary: Syntax highlighting JavaScript needs to be lazy
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Major
Assignee: Timothy Hatcher
URL:
Keywords:
Depends on: 14360
Blocks:
  Show dependency treegraph
 
Reported: 2008-06-19 10:36 PDT by Timothy Hatcher
Modified: 2008-06-20 15:22 PDT (History)
3 users (show)

See Also:


Attachments
Proposed patch (4.55 KB, patch)
2008-06-20 11:22 PDT, Timothy Hatcher
aroben: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Timothy Hatcher 2008-06-19 10:36:57 PDT
The new syntax highlighting is written in JavaScript and can be slow for large documents. We should make is lazy and only syntax highlight visible lines of code and delays the rest until the user scrolls down. Some of the work to make this lazy has already been done in the original patch.

Related to bug 14360.
Comment 1 Timothy Hatcher 2008-06-20 11:22:50 PDT
Created attachment 21858 [details]
Proposed patch
Comment 2 Adam Roben (:aroben) 2008-06-20 11:29:25 PDT
Comment on attachment 21858 [details]
Proposed patch

+                if (i < (end - 1))
+                    deleteContinueFlags(previousCell);

I think if (i > 0) would be clearer here.

r=me
Comment 3 Adam Roben (:aroben) 2008-06-20 11:32:47 PDT
(In reply to comment #2)
> (From update of attachment 21858 [details] [edit])
> +                if (i < (end - 1))
> +                    deleteContinueFlags(previousCell);
> 
> I think if (i > 0) would be clearer here.

...and more correct.
Comment 4 Timothy Hatcher 2008-06-20 15:22:28 PDT
Landed in r34695.