[Webkit-unassigned] [Bug 26316] 100% CPU hang for several seconds on large file syntax highlight.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jun 22 11:19:38 PDT 2009


https://bugs.webkit.org/show_bug.cgi?id=26316


pmuellr at yahoo.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pmuellr at yahoo.com




------- Comment #6 from pmuellr at yahoo.com  2009-06-22 11:19 PDT -------
That's really annoying.

Of course, all that time is more or less completely wasted because the file
being parsed isn't really debuggable in the first place.  And a shame, because
there's plenty of useful debug function (resource measurements) which can be
made on that site, which you are locked out of for a certain amount of time if
you inadvertently click on that file.

So one idea would be - don't parse that JavaScript.  Set a limit - say 100K -
on the size of a JS file which will have syntax highlighting applied to it.  

Another heuristic could be to try to identify "minified" JS files - which also
won't be very debuggable - you could do this by looking for very long lines,
though not quite sure what the heuristic would be there, to keep from
unintentionally labelling files that happen to contain long lines as "do not
parse".

In a perfect world, where JS developers had debug concerns in mind, we might
imagine annotating a JS file with a special comment "// not debuggable", in
which case debuggers might decline to provide some amount of debug
friendliness; but that's not very realistic; not many developers care about
debugging, it seems.


-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list