1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 09:27:35 +00:00
serenity/Userland
Andreas Kling 646b37d1a9 LibWeb: Cache CSS rules in buckets to reduce number of rules checked
This patch introduces the StyleComputer::RuleCache, which divides all of
our (author) CSS rules into buckets.

Currently, there are two buckets:
- Rules where a specific class must be present.
- All other rules.

This allows us to check a significantly smaller set of rules for each
element, since we can skip over any rule that requires a class attribute
not present on the element.

This takes the typical numer of rules tested per element on Discord from
~16000 to ~550. :^)

We can definitely improve the cache invalidation. It currently happens
too often due to media queries. And we also need to make sure we
invalidate when mutating style through CSSOM APIs.
2022-02-10 20:52:11 +01:00
..
Applets Keymap Applet: Spawn KeyboardSettings when clicking 2022-02-04 21:30:31 +01:00
Applications Applications: Port Spreadsheet to LibMain 2022-02-10 10:24:18 +00:00
Demos Meta+Userland: Run the GML formatter on CI and pre-commit 2022-02-07 18:39:50 +01:00
DevTools HackStudio: Fix error handling logic in delete_action 2022-02-10 21:41:05 +02:00
DynamicLoader DynamicLoader+LibC+LibTimeZone: Include LibTimeZone sources in LibC 2022-01-23 12:48:26 +00:00
Games Meta+Userland: Run the GML formatter on CI and pre-commit 2022-02-07 18:39:50 +01:00
Libraries LibWeb: Cache CSS rules in buckets to reduce number of rules checked 2022-02-10 20:52:11 +01:00
Services LibWeb: Perform CSS custom property cascade once instead of per-property 2022-02-10 20:52:11 +01:00
Shell Shell: Use strncmp() instead of string.compare() for name completions 2022-02-05 16:59:12 +03:30
Utilities pgrep: Port to LibMain 2022-02-10 14:10:58 +00:00
CMakeLists.txt Tests: Establish root Tests directory, move Userland/Tests there 2021-05-06 17:54:28 +02:00