Load FSDB scopes lazily and nest struct fields - #196
Open
amikhalev wants to merge 2 commits into
Open
Conversation
Eagerly materializing millions of scopes over IPC OOMs the extension host on large dumps. Keep a compact native hierarchy index, fetch children on expand, and treat FSDB STRUCT/RECORD as nested scopes so leaf names like aw_ready are not flattened into duplicates under the parent.
amikhalev
marked this pull request as ready for review
July 15, 2026 03:09
Lramseyer
reviewed
Jul 15, 2026
| let label = name; | ||
|
|
||
| // field is already included in signal name for fsdb | ||
| if (!isFsdb) label = name + field; |
Owner
There was a problem hiding this comment.
This does not need to be removed
Owner
|
@heyfey - Can you review this? This looks (mostly) good from my end. |
Contributor
|
Hi @amikhalev , thanks for your contribution! I will review it soon. And yes it's a great idea to defer NetlistItem creation to when we actually need it. I built eveything in JS side to avoid duplicating tree data in JS & C++, but turn out it's really slow for JS to create millions of treeitems. Your changes have one more benifit: by keeping a copy of scope tree in C++ side, we can easily implement "find scope/instance" there (#152) (I hesitate for "find signal" for fsdb) |
Serialize getChildren loads so concurrent scope expansion can't interleave vars through the shared readVars callback state, mark merged bus parents as loaded so expanding them doesn't wipe nested bits, and key var dedup on signalId+label so aliased vars aren't dropped.
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
ffrReadScopeTreeinstead of eagerly building millions ofNetlistItems over IPC (avoids extension-host OOM on large dumps).getScopeChildren, then vars viaffrReadVarByLogUOff(same on-demand pattern as VCD/FST).STRUCT/RECORDas nested netlist scopes so leaf names likeaw_readyare not flattened into duplicates under the parent module.Test plan
npm run compile-addon) with Verdi FSDB reader libs/headersaw_readyat the parent level)