Parser: Report use counts once per feature
Reporting use counts by invoking a callback once per occurrence has a large overhead cost in certain situations, for example when it needs to be dispatched to a different thread (which is the case for Web Workers). Parsing large scripts can produce a lot of occurrences (strict/sloppy mode once per function). Chromium (the only known user of UseCounters so far) does not actually care about number of occurrences, but simply whether they happened at least once. This commit changes behavior to report features at most once, which dramatically improves performance for impacted use cases, and should not affect the only known real world usage. R=littledan@chromium.org BUG=chromium:614775 Review-Url: https://codereview.chromium.org/2062203002 Cr-Commit-Position: refs/heads/master@{#36979}
Showing
Please
register
or
sign in
to comment