Repository navigation
revert: add BrowserWindow.isOccluded() - #41311
Merged
Merged
Conversation
This reverts commit 768ece6.
ckerr
approved these changes
Feb 12, 2024
|
No Release Notes |
1 of 6 tasks
3 tasks done
jstradej
pushed a commit
to jstradej/strideterm
that referenced
this pull request
Aug 12, 2026
A renderer CPU profile captured while the app sat idle overnight showed the main thread 27.6% busy with essentially no JavaScript — 5 samples out of 10790. The work arrived in bursts 16.6ms apart, one per vsync at 60Hz, which is the signature of CSS animations forcing style and paint instead of riding the compositor. Three infinite animations drove properties that cannot be composited: the two box-shadow pulses on active Task Dashboard pipeline steps and round chips, and the background-position shimmer on the Docker disk usage skeleton. Each is now a pseudo-element animating opacity or transform, which the compositor handles off the main thread. The glow carries pointer-events: none so the round chips stay clickable. Animations are additionally frozen outright while the window isn't being looked at, via html.app-hidden and animation-play-state. The !important there is load-bearing: the `animation` shorthand every animated rule uses resets play-state to `running`, at higher specificity than the freeze. Driving that class needs main-process help. Our windows disable backgroundThrottling so the xterm WebGL renderer doesn't stall mid-scroll (408220d), and Electron pins document.visibilityState to "visible" whenever that flag is off — visibilitychange never fires, so the renderer cannot observe that it stopped being watched. main now pushes minimize/hide/restore/show over window:visibility, while the remote/mobile client keeps using visibilitychange, which works there. Whichever input reports hidden wins. A window merely covered by other windows is still not detected. Chromium tracks native occlusion internally but exposes no API for it: BrowserWindow.isOccluded() was reverted five days after landing (electron/electron#41311) and is absent from Electron 43. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
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.
Description of Change
Closes #41295
Revert #38982 - it looks like there were missed failures on WOA. I'm working to debug but in the meantime we can revert to clear up CI depending how much progress I make.
Checklist
npm testpassesRelease Notes
Notes: none