Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #70 +/- ##
===========================================
- Coverage 59.51% 40.59% -18.92%
===========================================
Files 10 10
Lines 1035 1037 +2
===========================================
- Hits 616 421 -195
- Misses 305 545 +240
+ Partials 114 71 -43 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Code Review
This pull request introduces a check to skip delta generation for files smaller than the source path plus a small overhead, preventing inefficient delta sizes. A suggestion was made to replace the magic number used for the overhead calculation with a named constant to improve code clarity.
403962b to
14dd19b
Compare
|
I rebased this. |
|
It seems the code coverage test things the code coverage decreased by 19%, but i'm only adding three lines. Something must be going wrong with it. |
|
I think I can explain the drop in codecov - the proposed patch contains an optimization that's really very good. Turns out our test coverage now hits the optimization so we're not executing the old codepaths. Good for the tool, but makes codecov sad. There's nothing wrong with this patch. But we do need to update the test cases to use data that doesn't trigger the optimization. Here's a quick compare of main branch coverage vs the PR: on main: from pr: |
|
I just created an issue to update the tests (#76). This PR is good to merge imo, I think the commits just need to be re-signed. |
Files that are smaller than the pathname of the delta source (and some extra header bytes) now are copied directly to the delta rather than being delta:ed, because just the delta header would already be larger than the file content. This happens a lot in e.g. bootc images, because there are lots of tiny ostree metadata objects that have long pathnames, like the *.file-xattrs-link files that are 46 bytes, but have 110 char long pathnames. Signed-off-by: Alexander Larsson <alexl@redhat.com>
14dd19b to
00093ac
Compare
|
I signed the commit |
Files that are smaller than the pathname of the delta source (and some extra header bytes) now are copied directly to the delta rather than being delta:ed, because just the delta header would already be larger than the file content.
This happens a lot in e.g. bootc images, because there are lots of tiny ostree metadata objects that have long pathnames, like the *.file-xattrs-link files that are 46 bytes, but have 110 char long pathnames.