Skip to content

Fix #123 performance bottlenecks#125

Open
adragnevVW wants to merge 2 commits intomasterfrom
Fix-#123-Performance-Bottlenecks
Open

Fix #123 performance bottlenecks#125
adragnevVW wants to merge 2 commits intomasterfrom
Fix-#123-Performance-Bottlenecks

Conversation

@adragnevVW
Copy link
Collaborator

@adragnevVW adragnevVW commented Oct 30, 2025

Fix for #123:

Changes:
Improving GetSymDefAt() and GetSymDefCount()
Adding a check if the symbol contains other symbol as a child.

@adragnevVW
Copy link
Collaborator Author

Hi @AndriiVoitenko,
Do you think this change must be submitted?

@adragnevVW adragnevVW requested review from AndriiVoitenko and removed request for AndriiVoitenko November 25, 2025 09:13
@adragnevVW
Copy link
Collaborator Author

Hi @AndriiVoitenko ,
Do you think we can submit this change?

@AndriiVoitenko
Copy link
Collaborator

@adragnevVW I’m not quite sure I understand the purpose of this optimization. The problem is that several different object types are combined into one fAuxDataObjs. That means that each API returning a specific object type at a given position have to search through the shared list. If I understand correctly, you created a parallel list fSymDefObjs that contains only SymDef objects to avoid searching by index.

But what about the other object types? Why didn’t you create separate lists for them as well? With this changes you optimize only API for SymDef. And why you leave them in a general list? If SymDef objects already have they own dedicated list, why do we need the shared one?

}

// Increase position count
positionCount++;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without incrementing of posionCount will be endless loop, or I oversee something?

newSymDef->ReadFromNode(node, this);

fAuxDataObjs.push_back(newSymDef);
fSymDefObjs.push_back( newSymDef );
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

newSymDef comes in both fAuxDataObjs and fSymDefObjs. Are you sure?

Copy link
Contributor

@ILane-VW ILane-VW left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see changes from Andrii

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.

3 participants