Some small optimizations go a long way.
There's no need to add duplicate actions to the serialized list as long as order is preserved. We can't check the whole list to see if a duplicate action has been added, because that would break ignore-previous-rules, but we can check the previous action, which is where most of the duplicate actions will be.
Also, ignore-previous-rules ignores the previous rules only in that extension, but block can return early without processing other extensions.
Created attachment 247872 [details]
Comment on attachment 247872 [details]
View in context: https://bugs.webkit.org/attachment.cgi?id=247872&action=review
> + if (ruleIndex && rule.action() == ruleList[ruleIndex - 1].action())
> + continue;
I don't think that is right, actionLocations should point to actionLocations[ruleIndex - 1] instead of actions.size()
Created attachment 247920 [details]
Comment on attachment 247920 [details]
Clearing flags on attachment: 247920
Committed r181065: <http://trac.webkit.org/changeset/181065>
All reviewed patches have been landed. Closing bug.