On Thu, Dec 3, 2009 at 8:30 AM, Matias Pelenur <[email protected]>wrote:
> Hi, > Is it bad if one or more content scripts match a list of 30 or 40 (or > more) URL patterns? > For example, if for every page loaded, Chrome does a linear search > over all the match patterns of all content scripts of all extensions, > I can see how this could become a problem. But perhaps, since the > match patterns are fairly restrictive globs, and not regexes, this can > be done pretty efficiently. > Yes, matching is fairly efficient. Unfortunately, I don't think we've done any performance testing to see at what point the number of matches starts to become prohibitive, but I'm confident there's a limit there somewhere. :) It should be pretty straightforward to measure though. In your example of 30-40, can you do a little timing? A simple way to do it would be to have an http://*/* content script at document_start that recorded the start time and then your 30-40 example that used document_end and then measure the time delta in the page's onload event. Erik > > Any insight would be appreciated. > > Thanks, > matias > > -- > > You received this message because you are subscribed to the Google Groups > "Chromium-extensions" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<chromium-extensions%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/chromium-extensions?hl=en. > > > -- You received this message because you are subscribed to the Google Groups "Chromium-extensions" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/chromium-extensions?hl=en.
