mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2026-04-19 02:10:26 +00:00
Avoid expensive cross-hierarchy dynamic_cast from JS::Object to UniversalGlobalScopeMixin on every microtask checkpoint. Since UniversalGlobalScopeMixin is not in the JS::Object inheritance chain, as<UniversalGlobalScopeMixin>(JS::Object&) falls through to dynamic_cast, which is very costly. Profiling showed this taking ~14% of total CPU time. Add EnvironmentSettingsObject::universal_global_scope() backed by a pointer cached eagerly during initialization. |
||
|---|---|---|
| .. | ||
| EventLoop.cpp | ||
| EventLoop.h | ||
| Task.cpp | ||
| Task.h | ||
| TaskQueue.cpp | ||
| TaskQueue.h | ||