MunchLab / MunchLab/ceREEBerus

computeReeb triggers O(N) full layout recomputations instead of O(1)

Open
#107 0 comments 0 reactions 1 assignee View on GitHub

@ishikaghosh2201 is already working on this.

Since Sep 17, 2026.

bug
Dominant language
Jupyter Notebook
Stars
5
Forks
2
PR merge metrics
No merged PRs in 30d

Description

ReebGraph.add_node / add_edge default to reset_pos=True, which calls set_pos_from_f() → reeb_x_layout() → a full scipy.optimize.minimize (L-BFGS-B) pass over the entire graph built so far.

computeReeb (in cereeberus/compute/computereeb.py) builds the graph one node/edge at a time and never overrides reset_pos, so a Reeb graph that ends up with N nodes triggers N full layout optimisations instead of one at the end.

The slowdown is reproduced in the attached notebook and a fix is proposed.

reset_pos_performance.ipynb

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.