Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce early check for submodule presence in status evaluation #607

Merged
merged 3 commits into from
Jan 26, 2024

Conversation

mih
Copy link
Member

@mih mih commented Jan 26, 2024

This can dramatically boost performance with many submodules. Checking
the filesystem for a file is much cheaper than running git rev-parse.

When a subdataset is present, this obviously means an additional cost.
However, in comparison to the then following state evaluation, it should
still be cheap.

Worth it, IMHO.

Closes: #606

This can dramatically boost performance with many submodules. Checking
the filesystem for a file is much cheaper than running `git rev-parse`.

When a subdataset is present, this obviously means an additional cost.
However, in comparison to the then following state evaluation, it should
still be cheap.

Worth it, IMHO.

Closes: datalad#606
This is less about performance (marginal improvement), but simply code
complexity. In the present case we never expect more than two lines of
(short) output.
Now matches the actual expectations of the function
Copy link

codecov bot commented Jan 26, 2024

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (8f5e4b3) 92.99% compared to head (48d69b9) 92.94%.

Files Patch % Lines
datalad_next/iter_collections/gitstatus.py 71.42% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #607      +/-   ##
==========================================
- Coverage   92.99%   92.94%   -0.06%     
==========================================
  Files         159      159              
  Lines       11852    11853       +1     
  Branches     1794     1794              
==========================================
- Hits        11022    11017       -5     
- Misses        644      648       +4     
- Partials      186      188       +2     

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

@mih mih added this to the 1.1.1 milestone Jan 26, 2024
@mih mih merged commit 3aa473b into datalad:main Jan 26, 2024
6 of 8 checks passed
@mih mih deleted the bf-606 branch January 26, 2024 14:07
@mih mih modified the milestones: 1.1.1, 1.2 Feb 2, 2024
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.

Investigate performance of next-status with many subdatasets
1 participant