Reduce main-thread thrashing and eliminate full-page-reload on nav#265
Draft
Blargian wants to merge 1 commit into
Draft
Reduce main-thread thrashing and eliminate full-page-reload on nav#265Blargian wants to merge 1 commit into
Blargian wants to merge 1 commit into
Conversation
Blargian
commented
Jun 24, 2026
Member
- Replace scroll-reset.js rAF polling loop (60fps, forever) with history.pushState/replaceState patch that fires ch:navigate events
- Use history.pushState in tab-nav.js for locale/tab navigation so switching translations is SPA-speed instead of a full page reload
- Add RAF debounce to the three unthrottled MutationObservers in navbar-cta.js, ask-ai-button.js, and quickstart-back-link.js; those observers fired on every React DOM mutation with no throttle
- Disconnect navbar-cta and ask-ai-button observers once injection succeeds — they don't need to keep watching after that
- Replace updateLogoTheme() with pure CSS display rules in styles.css
- Replace 9 inline style assignments in styleDropdownHeaders() with a single CSS class (.ch-mobile-nav-header) defined in styles.css
- Move all injectStyles() CSS blocks from JS into styles.css so they parse at load time rather than being injected late (affects clickhouse-sql-highlight.js, custom-footer.js, navbar-cta.js, ask-ai-button.js)
- Replace scroll-reset.js rAF polling loop (60fps, forever) with history.pushState/replaceState patch that fires ch:navigate events - Use history.pushState in tab-nav.js for locale/tab navigation so switching translations is SPA-speed instead of a full page reload - Add RAF debounce to the three unthrottled MutationObservers in navbar-cta.js, ask-ai-button.js, and quickstart-back-link.js; those observers fired on every React DOM mutation with no throttle - Disconnect navbar-cta and ask-ai-button observers once injection succeeds — they don't need to keep watching after that - Replace updateLogoTheme() with pure CSS display rules in styles.css - Replace 9 inline style assignments in styleDropdownHeaders() with a single CSS class (.ch-mobile-nav-header) defined in styles.css - Move all injectStyles() CSS blocks from JS into styles.css so they parse at load time rather than being injected late (affects clickhouse-sql-highlight.js, custom-footer.js, navbar-cta.js, ask-ai-button.js) Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Contributor
|
Preview deployment for your docs. Learn more about Mintlify Previews.
|
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.