microsoft / microsoft/automatic-graph-layout

Memory leak in GViewer.RemoveNode() / RemoveEdge()

Open
#175 3 comments 0 reactions 0 assignees View on GitHub

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.