WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
15902
15% of string-validate-input.js is spent compiling the same regular expression
https://bugs.webkit.org/show_bug.cgi?id=15902
Summary
15% of string-validate-input.js is spent compiling the same regular expression
Geoffrey Garen
Reported
2007-11-08 14:09:02 PST
A short history: In
bug 15861
, we concluded that, for compatibility with Firefox and ECMA3, we should create a single, persistent RegExpImp (JS wrapper) per regular expression literal in the AST. However, IE6 creates a new JS wrapper each time the regular expression literal is evaluated. Also, Firefox's behavior has caused many compatibility problems. (See
https://bugzilla.mozilla.org/show_bug.cgi?id=98409
.) And, as a result of these facts, the current draft of ECMA4 contradicts ECMA3 and specifies the IE6 behavior. (See
http://www.ecmascript.org/es4/spec/incompatibilities.pdf
.) So, I don't think we should create a single, persistent RegExpImp (JS wrapper) per regular expression literal in the AST. However, building on the work in
bug 15861
, I think we can store a compiled RegExp in the AST, for a performance win.
Attachments
Patch
(8.68 KB, patch)
2007-11-09 11:42 PST
,
Geoffrey Garen
sam
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Eric Seidel (no email)
Comment 1
2007-11-08 14:11:20 PST
I think perhaps we should dup
bug 15900
to this one :) Got to love web compatibility!
Geoffrey Garen
Comment 2
2007-11-08 15:48:41 PST
***
Bug 15900
has been marked as a duplicate of this bug. ***
Geoffrey Garen
Comment 3
2007-11-09 11:42:26 PST
Created
attachment 17159
[details]
Patch
Geoffrey Garen
Comment 4
2007-11-11 20:31:03 PST
Committed revision 27702.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug