rustworkx icon indicating copy to clipboard operation
rustworkx copied to clipboard

fix issue #585 that pickling graph & digraph do not preserve original edge index

Open binh-vu opened this issue 3 years ago • 2 comments

This PR fixes issue #585. Now pickling graph & digraph should keep the original edge index.

Did a simple benchmark with directed_mesh_graph(300) (no node removed and 50 nodes removed -- 1/6 of the graph). Performance is very similar to previous implementation. If we do not need to maintain the original edge index, the new code is ~10% faster. The serialized data size of the graph is almost the same as previous implementation if no edge is removed. When 1/6 of the graph is removed, the serialized size is increased by about 6%.

binh-vu avatar Apr 18 '22 01:04 binh-vu

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Apr 18 '22 01:04 CLAassistant

Pull Request Test Coverage Report for Build 2182282857

  • 293 of 321 (91.28%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.2%) to 97.884%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/digraph.rs 147 161 91.3%
src/graph.rs 146 160 91.25%
<!-- Total: 293 321
Totals Coverage Status
Change from base Build 2173032073: -0.2%
Covered Lines: 11102
Relevant Lines: 11342

💛 - Coveralls

coveralls avatar Apr 18 '22 15:04 coveralls

Any chance this would get merged?

dizhouwu avatar May 06 '23 15:05 dizhouwu

Any chance this would get merged?

There were some issues I outlined in review that I thought needed to be updated before we merged. But it looks like the has stalled since my initial review. I'll take a quick look to see if I can rebase it and then fix the issues I outlined.

mtreinish avatar May 08 '23 19:05 mtreinish

Pull Request Test Coverage Report for Build 4929430178

  • 250 of 278 (89.93%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.1%) to 96.936%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/digraph.rs 126 140 90.0%
src/graph.rs 124 138 89.86%
<!-- Total: 250 278
Totals Coverage Status
Change from base Build 4919724815: -0.1%
Covered Lines: 14519
Relevant Lines: 14978

💛 - Coveralls

coveralls avatar May 08 '23 21:05 coveralls

Thank you so much for merging this - wondering if we could be getting a release soon?

dizhouwu avatar May 14 '23 20:05 dizhouwu