[Webkit-unassigned] [Bug 38142] RegExp caching
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Apr 26 23:53:18 PDT 2010
https://bugs.webkit.org/show_bug.cgi?id=38142
--- Comment #5 from Renata Hodovan <hodovan.renata at stud.u-szeged.hu> 2010-04-26 23:53:16 PST ---
(In reply to comment #3)
> Do you have data on where ws-email creates regular expressions?
ws-email tests random strings whether they are valid e-mail addresses. The
neccessery regular expressions are too long, hence they are created from
substrings. One such example follows:
var specialChars="\\(\\)><@,;:\\\\\\\"\\.\\[\\]";
var validChars="\[^\\s" + specialChars + "\]";
var quotedUser="(\"[^\"]*\")";
var atom=validChars + '+';
var word="(" + atom + "|" + quotedUser + ")";
var userPat=new RegExp("^" + word + "(\\." + word + ")*$");
Every time when the function is called these regular expressions are recreated.
This takes a lot of time because regular expressions parsing is expensive.
Furthermore there are many fallbacks to PCRE.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list