mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-24 10:22:05 -05:00
56081cdb6e
Currently, navigating through different years in the Year view of the Calendar app or the taskbar is very slow. Profiling results show that almost all the time is spent in `Calendar::update_tiles`, and specifically, in `DateTime::create` and `DateTime::set_time`. Performance can improve substantially if the `TZ` environment variable is set [0], but we can improve the current code to perform better nevertheless :^) This diff focuses on removing the need of the `Tile` struct to require the instantiation of a `DateTime` object, which avoids _at least_ 365 object instantiations in the Year view, on each `update_tiles` call. Instead, as the `date_time` isn't used often, we can instantiate it on demand when a particular date is selected. [0] https://blog.packagecloud.io/set-environment-variable-save-thousands-of-system-calls/ |
||
---|---|---|
.. | ||
Applets | ||
Applications | ||
Demos | ||
DevTools | ||
DynamicLoader | ||
Games | ||
Libraries | ||
Services | ||
Shell | ||
Utilities | ||
CMakeLists.txt |