perf: eliminate popover data duplication via DOM lookup (~50% per-type size reduction)#365
Closed
mikaello wants to merge 0 commit into
Closed
perf: eliminate popover data duplication via DOM lookup (~50% per-type size reduction)#365mikaello wants to merge 0 commit into
mikaello wants to merge 0 commit into
Conversation
Avrodoc Preview 🔍A live preview of the generated documentation is available at: This preview is built from the |
11608a3 to
5646b18
Compare
Base automatically changed from
fix/cross-file-type-reference-order
to
migrate-phase2-ssr
April 14, 2026 19:48
af2d48c to
5646b18
Compare
5646b18 to
c222236
Compare
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.
Summary
Implements performance optimization 1 from #361 (comment).
Previously,
named_type_detailsHTML was rendered twice per type at server startup:<section>elements<script id="popover-data" type="application/json">JSON blobThe JSON blob was then parsed at page load and used to populate Bootstrap popovers on hover.
Changes
buildPopoverData()fromstatic_content.js— no more double-rendering<script id="popover-data">fromtop_level.njkpopover_title.njk— was only used bybuildPopoverData()setupPopovers()inavrodoc.jsto usefindSection(href)and read popover title/content directly from the existing DOM elements:h2.namespace+h1.type-namein the section.type-detailsinnerHTML (new wrapper div innamed_type.njk)<div class="type-details">wrapper innamed_type.njkto allow clean content extraction without duplicating the heading elements in the popover bodyResult
popoverDataJSON parse on page load#/schema/<qualifiedName>), which were previously excluded from popover data