v1.0.6 - Performance Optimization Release
What's Changed
- Optimize Extension Performance by @DeclanE47 in #13
Key Improvements
-
Consolidated Event Listeners:
- Combined redundant event listeners (
onInstalled
andonStartup
) to streamline initialization and reduce overhead.
- Combined redundant event listeners (
-
Optimized Badge Update Logic:
- Replaced
setInterval
withchrome.alarms
API for periodic checks, minimizing CPU usage. - Refined
setTimeout
usage inupdateBadgeText
to ensure smooth countdown updates without excessive resource consumption.
- Replaced
-
Debounced Storage Operations:
- Added a debounce function to limit
chrome.storage
updates, reducing the frequency of writes and improving efficiency during rapid changes.
- Added a debounce function to limit
-
Lazy-Loaded Dark Mode Toggle:
- Loaded dark mode toggle functionality only when accessed, enhancing load performance by deferring initialization until needed.
-
Improved Selector Usage in
clickRefreshButton
:- Reordered selectors in
clickRefreshButton
based on usage frequency, optimizing DOM queries for faster button detection in complex UIs.
- Reordered selectors in
-
Minified and Simplified CSS:
- Reduced CSS size in
popup.html
, decreasing load time and improving rendering speed.
- Reduced CSS size in
-
Reduced Logging in Production:
- Limited console logging in production code paths, decreasing the resource impact of log generation during high-frequency operations.
These changes provide a faster, more resource-efficient experience, especially in scenarios with frequent refresh intervals.
Full Changelog: v1.0.5...v1.0.6