[webkit-reviews] review requested: [Bug 36080] Performance degradations when using large javascript files : [Attachment 51559] First stab at a patch.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Mar 24 15:32:29 PDT 2010


David Leong <david.leong at nokia.com> has asked  for review:
Bug 36080: Performance degradations when using large javascript files
https://bugs.webkit.org/show_bug.cgi?id=36080

Attachment 51559: First stab at a patch.
https://bugs.webkit.org/attachment.cgi?id=51559&action=review

------- Additional Comments from David Leong <david.leong at nokia.com>
This patch makes JSC::SourceProvider::hasBOMs() virtual so sub classes can
inherit from it. This method is overwritten for both the
CachedScriptSourceProvider and the StringSourceProvider. For the
CachedScriptSourceProvider, I delegated the BOM check to the CachedScript as
the buffer maybe deleted by the decoded data callback timer. For the
StringSourceProvider the BOM check is done when the class is constructed. Both
classes store the results of the BOM check so that repeated calls by the
JSC::Parser for source code will not repeat the BOM checks.

I was thinking should we move the BOM checking to the base class
ScriptSourceProvider? In that case how would we deal with the decoded data
deletion by the CachedScript.

Any feedback or ideas would be greatly appreciated.


More information about the webkit-reviews mailing list