4 ms·
It’s kept low for performance. I wonder if they’ll revisit the limit at some point.
by saagarjha 7y ago
It’s kept low for performance. I wonder if they’ll revisit the limit at some point.
- quotemstr 7y agoWhat performance? Build a DDA out of the union of all the patterns and run it over each URL. Now you have O(1) (with low constant factors) matching no matter how many patterns you have. The DFA itself takes space and memory dereferences aren't free either, but even huge DFAs can be very compact.
- saagarjha 7y agoThey do build a DFA of the rules.
- buran77 7y agoThen why enforce the same limit for the iPhone 6s and a top of the line (i)Mac Pro? The elegant solution would be to start with a sensible preset for your device, allow you to change it if you want, and then warn you if some noticeable delays are detected. IE used to do this with addon loading.