microsoft / microsoft/automatic-graph-layout
Memory leak in GViewer.RemoveNode() / RemoveEdge()
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 1.5k
- Forks
- 319
- Avg merge
- 38m
- Merged PRs (30d)
- 1
Description
While working with a large graph (more than 2000 nodes) I realized that calling RemoveNode is both very slow and leads to a large amount of memory wasted.
Reson is that RemoveNode and RemoveEdge instantiates a very large number of BBNode objects and leaves them on heap unused.
I was trying to fix the issue but not fully understand the goal of BBNode objects. Can you please shortly explain what is the purpose and the lifecycle of these objects ? When is safe to dispose them ?
Thank you.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading GViewer.RemoveNode() and GViewer.RemoveEdge(), then trace where they instantiate BBNode objects and how those objects are retained after removal. Determine the intended BBNode purpose and lifecycle, and document or change the cleanup behavior so removed graph elements no longer leave unused objects on the heap.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- computer-graphics
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100