summaryrefslogtreecommitdiff
path: root/Documentation/Browser
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2023-03-30 11:18:50 +0200
committerAndreas Kling <kling@serenityos.org>2023-03-30 14:12:07 +0200
commit1f166b3a15b38e1ee065905d4e99401ba39b9f8e (patch)
treef1189093bba2c2d2d0cc6db5fae4838d6af65b59 /Documentation/Browser
parentd4b2544dc55785f7233f84943ae579be31e43e5e (diff)
downloadserenity-1f166b3a15b38e1ee065905d4e99401ba39b9f8e.zip
LibWeb: Don't re-sort StyleSheetList on every new sheet insertion
This was causing a huge slowdown when loading some pages with weirdly huge number of style sheets. For example, amazon.com has over 200 style elements, which meant we had to resort the StyleSheetList 200 times. (And sorting itself was slow because it has to compare DOM positions.) Instead of sorting, we now look for the correct insertion point when adding new style sheets, and we start the search from the end, which is where style sheets are typically added in the vast majority of cases. This removes a 600ms time sink when loading Amazon on my machine! :^)
Diffstat (limited to 'Documentation/Browser')
0 files changed, 0 insertions, 0 deletions