optimize url querying
Scripts are injected to pages with URLs matching specified patterns, like https://*.example.com/something/. Currently, when a page gets loaded, all possible patterns matching its URL are computed and looked for in settings. This can easily amount for several dozens patterns for longer URLs. This is a temporary solution that needs optimizing.
background/settings_query.js is where querying takes place. However, improvements will probably require the storage system to be modified as well.