Skip to content

revert: optmization test - #216

Merged
luongtrieuvy202 merged 3 commits into
previewfrom
test
Sep 10, 2026
Merged

luongtrieuvy202 merged 3 commits into
previewfrom
test

Conversation

@luongtrieuvy202

Copy link
Copy Markdown
Contributor

No description provided.

luongtrieuvy202 and others added 3 commits September 11, 2026 01:19
The UI ships every rule inside its JS (webpack style-loader) and injects them
as separate <style> tags at runtime — 92 live on a loaded desk, ~200 over a
longer session. This page therefore links no application CSS at all.

That is expensive at render time, not just at load: Chrome consults one RuleSet
per stylesheet for every element it restyles, so a ~5,800-element recalculation
performed well over a million rule-set consultations. Measured on production
2026-09-11 at 12-30us per element, against well under 1us for a normal
document, and 33.4s of style recalculation in a single session.

The UI side now extracts one merged `styles.<hash>.css` and lists it in the
same manifest.json these bundles already come from, so this only has to read
one more key and emit one more <link>.

OPTIONAL BY DESIGN, so this is safe to deploy on its own and should go FIRST:
a UI build that predates the change has no `styles.css` key, `data.styles` is
null, the guard in index.tpl emits nothing, and the runtime <style> injection
keeps working exactly as it does today. The non-manifest branch never sets the
key at all, which the template also tolerates.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Links the app stylesheet emitted by ui-team's perf/css-single-stylesheet build.
Optional by design: with a UI build that has no styles.css in its manifest this
changes nothing, so it is safe ahead of the UI deploy — and must land first,
since the reverse order renders the app unstyled.
@luongtrieuvy202
luongtrieuvy202 merged commit abb87d9 into preview Sep 10, 2026
11 checks passed
@sonarqubecloud

Copy link
Copy Markdown

@github-actions

github-actions Bot commented Sep 10, 2026

Copy link
Copy Markdown

Claude encountered an error after 0s —— View job


I'll analyze this and get back to you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant