RESOLVED FIXED 143325
[Content Extensions] Only add unique universal action locations.
https://bugs.webkit.org/show_bug.cgi?id=143325
Summary [Content Extensions] Only add unique universal action locations.
Alex Christensen
Reported 2015-04-01 17:06:53 PDT
Right now we have waaaay too many actions on the DFA root. That's slowing things down a lot.
Attachments
Patch (1.86 KB, patch)
2015-04-01 17:08 PDT, Alex Christensen
benjamin: review+
Alex Christensen
Comment 1 2015-04-01 17:08:53 PDT
Benjamin Poulain
Comment 2 2015-04-01 17:13:59 PDT
Comment on attachment 249954 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=249954&action=review > Source/WebCore/contentextensions/ContentExtensionCompiler.cpp:151 > You could take the opportunity to remove that blank line.
Alex Christensen
Comment 3 2015-04-01 17:18:04 PDT
Darin Adler
Comment 4 2015-04-02 09:05:50 PDT
Comment on attachment 249954 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=249954&action=review > Source/WebCore/contentextensions/ContentExtensionCompiler.cpp:136 > + HashSet<uint64_t> universalActionLocations; HashSet won’t work with 0 nor will it work with the maximum value. Do we have a guarantee that actionLocationAndFlags will never have either of those values?
Alexey Proskuryakov
Comment 5 2015-04-02 09:37:17 PDT
This patch made a test assert: https://webkit-test-results.appspot.com/dashboards/flakiness_dashboard.html#showAllRuns=true&tests=http%2Ftests%2Fcontentextensions%2Fwhitelist.html ASSERT(!HashTranslator::equal(KeyTraits::emptyValue(), key)); Looks like Darin's comment is spot on.
WebKit Commit Bot
Comment 6 2015-04-02 09:40:06 PDT
Re-opened since this is blocked by bug 143338
Alex Christensen
Comment 7 2015-04-02 12:48:54 PDT
I forgot the HashTraits :( The value can be 0, so I used UnsignedWithZeroKeyHashTraits. We only use the lowest 48 bits of the uint64_t, so it will never be the maximum 2 values. http://trac.webkit.org/changeset/182283
Note You need to log in before you can comment on or make changes to this bug.