perf: massive optimization overhaul — 75% binary reduction and instant UI responsiveness#53
Merged
perf: massive optimization overhaul — 75% binary reduction and instant UI responsiveness#53
Conversation
- Reduced binary size from ~2MB to 528KB by replacing heavy crates (reqwest, tokio, dirs, winreg, thiserror) with native Win32 APIs. - Optimized RAM usage by implementing 25% resolution downsampled screen capture (16x buffer saving) and explicit buffer flushing on idle. - Eliminated UI lag by refactoring the event loop to use PostThreadMessageW for near-instantaneous event processing. - Implemented real file streaming (SHCreateStreamOnFileEx) for WebView2 to handle large assets with flat memory usage. - Hardened native networking with custom WinHTTP stack featuring timeouts and robust redirect handling. - Modernized global state management using standard library OnceLock. - Achieved zero-warning build and implemented surgical working set management.
14 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
This PR implements a comprehensive technical overhaul of PauseCat, focusing on "Extreme Optimization" and "High-Fidelity Responsiveness." By shifting from high-level, heavy
dependencies to native Win32 APIs, we have reduced the binary size by approximately 75% and eliminated all reported UI latency.
Key Changes
degradation of the blur effect.
eliminating the previous 100ms - 1s polling delays.
"stuck on checking" issue.
Technical Notes
Verification Results
By submitting this PR, I agree to follow the project's Code of Conduct.