Bug 213243 - O(n^2) behavior in media query resolution
Summary: O(n^2) behavior in media query resolution
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks: 212757
  Show dependency treegraph
 
Reported: 2020-06-16 04:58 PDT by Antti Koivisto
Modified: 2020-06-16 22:54 PDT (History)
1 user (show)

See Also:


Attachments
patch (4.16 KB, patch)
2020-06-16 05:10 PDT, Antti Koivisto
no flags Details | Formatted Diff | Diff
patch (4.00 KB, patch)
2020-06-16 05:53 PDT, Antti Koivisto
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Antti Koivisto 2020-06-16 04:58:06 PDT
RuleSet::evaluteDynamicMediaQueryRules has complexity num(media queries) * num(style rules) for queries that flip value.

This can become significant for pages that have 1000s of media queries.
Comment 1 Antti Koivisto 2020-06-16 05:01:43 PDT
<rdar://63997043>
Comment 2 Antti Koivisto 2020-06-16 05:10:05 PDT
Created attachment 401995 [details]
patch
Comment 3 Antti Koivisto 2020-06-16 05:53:00 PDT
Created attachment 401997 [details]
patch
Comment 4 EWS 2020-06-16 08:12:35 PDT
Committed r263092: <https://trac.webkit.org/changeset/263092>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 401997 [details].