Will Martin b449ac1d25 [PM-44168] Render the popup loading spinner only while loading (#23528) (#23862)
The spinner in the popup page shell is always in the DOM and merely hidden with
tw-invisible. visibility:hidden does not stop a CSS animation, so bwi-spin keeps
running for the life of the popup at ~30 fps on a page that is doing nothing.

Every frame forces a style recalculation across the page. With the Tailwind
:has() variants on each item row that is expensive: the renderer allocates about
8 MB/s, some 500 MB a minute. It is freed again, just not fast enough -- VmData
climbs until it hits the 8 GiB RLIMIT_DATA Chromium applies to renderers, mmap
fails and V8 aborts, leaving a SIGILL core dump of that one renderer while the
browser keeps running.

That is the crash behind #23309, #23431 and #23022. None could be reproduced,
which fits: nothing leaks, the DOM does not grow and the JS heap stays flat, so
a heap snapshot shows nothing. Measured on a local build with the popup open and
untouched, growth went from +500 MB/min to -1.5 MB/min, while
document.getAnimations() reported exactly one running animation -- bwi-spin, on
a bit-icon whose computed visibility was hidden.

Guarding with @if is what every other spinner in the codebase already does. The
overlay is absolutely positioned, so not rendering it costs no layout.



(cherry picked from commit d1d1224ef0)

Co-authored-by: Urias Uhle <101756727+Lolig4@users.noreply.github.com>
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-10-14 10:08:31 -04:00
2024-01-30 06:50:54 -08:00
2021-12-21 15:43:35 +01:00
2022-03-15 15:39:14 -04:00

Bitwarden

GitHub Workflow browser build on main GitHub Workflow CLI build on main GitHub Workflow desktop build on main GitHub Workflow web build on main


Bitwarden Client Applications

This repository houses all Bitwarden client applications except the mobile applications (iOS | android).

Please refer to the Clients section of the Contributing Documentation for build instructions, recommended tooling, code style tips, and lots of other great information to get you started.

We're Hiring!

Interested in contributing in a big way? Consider joining our team! We're hiring for many positions. Please take a look at our Careers page to see what opportunities are currently open as well as what it's like to work at Bitwarden.

Contribute

Code contributions are welcome! Please commit any pull requests against the main branch. Learn more about how to contribute by reading the Contributing Guidelines. Check out the Contributing Documentation for how to get started with your first contribution.

Security audits and feedback are welcome. Please open an issue or email us privately if the report is sensitive in nature. You can read our security policy in the SECURITY.md file.

2026-11-04 21:38:55 +00:00
Languages
TypeScript 89.6%
HTML 4.6%
Rust 2.6%
SCSS 1.1%
MDX 0.9%
Other 1%