Skip to content

Speeding up copying of objects - #559

Merged
jgrewe merged 5 commits into
G-Node:masterfrom
jgrewe:copy_objects
Nov 10, 2026
Merged

jgrewe merged 5 commits into
G-Node:masterfrom
jgrewe:copy_objects

Conversation

@jgrewe

@jgrewe jgrewe commented Oct 25, 2026

Copy link
Copy Markdown
Member

This pr should fix issues #557, #558, and #527

For historical reasons (we used to use the uuid of the objects as h5group names in early versions) the copy* functions were still performing the searches.

Thank you @drodarie for reporting and the suggested fix!

passing the h5group directly instead of the source. This leaks even
more backend stuff to the front-end classes than before, but since we
are not going to implement another backend soon, who cares
@jgrewe
jgrewe requested review from achilleas-k and a balanced review from Copilot and removed request for Copilot October 25, 2026 15:30
@jgrewe

jgrewe commented Oct 25, 2026

Copy link
Copy Markdown
Member Author

@achilleas-k would be great if you could cross-check. I hope I did not overlook any side-effects...

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.59%. Comparing base (a89d844) to head (eb0f1e4).
⚠️ Report is 41 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #559      +/-   ##
==========================================
- Coverage   81.38%   78.59%   -2.79%     
==========================================
  Files          81       59      -22     
  Lines       10828     9756    -1072     
==========================================
- Hits         8812     7668    -1144     
- Misses       2016     2088      +72     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@coveralls

Copy link
Copy Markdown

Coverage Status

coverage: 78.599% (-0.02%) from 78.616% — jgrewe:copy_objects into G-Node:master

@achilleas-k achilleas-k left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This all looks very sane to me. I don't have as good a grasp of all the details here as I used to, so I can only say this appears valid and it works, so I'm trusting you about the performance improvements :)

LGTM

Comment thread nixio/hdf5/h5group.py
Comment on lines -282 to 285
grp = self.group
dest.open_group(cls, create=True)
dest_grp = dest.group[cls]
grp = self.group
grp.copy(source=source, dest=dest_grp, name=name, shallow=shallow)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This change is unrelated to the commit (and ineffectual) but that's fine.

@jgrewe
jgrewe merged commit 7b91b7c into G-Node:master Nov 10, 2026
20 checks passed
@jgrewe
jgrewe deleted the copy_objects branch November 28, 2026 09:28
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.

Section.copy_section for n sections is O(n²) Copying Block with n entities is O(n²) HDF5 RuntimeError on second+ level Section copy

4 participants