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

Speedup osc status #309

Merged
merged 3 commits into from Aug 15, 2017
Merged

Speedup osc status #309

merged 3 commits into from Aug 15, 2017

Conversation

bmwiedemann
Copy link
Member

@bmwiedemann bmwiedemann commented Jul 25, 2017

The 2nd commit is the main change with a small semantic change
allowing osc status on a openSUSE:Factory checkout to finish in 34 seconds instead of 730-1100 seconds.

The other commits are optional improvements.

@bmwiedemann bmwiedemann force-pushed the speedup branch 3 times, most recently from 91addcf to fd2f3d3 Compare July 25, 2017 07:52
@marcus-h
Copy link
Member

marcus-h commented Jul 25, 2017 via email

@bmwiedemann
Copy link
Member Author

bmwiedemann commented Jul 26, 2017

yes, I dropped the last commit after having to change the 2nd commit, because the update tests failed when I assumed that changed sizes mean "M" status.

Introducing a config option would make the code more complex and decrease the test-coverage.

The only way I know to change files without the timestamp being modified is using loop devices (e.g. via losetup or mount -o loop) but I do not think that is used on source files.

The other would be an explicit touch -d or -r but then the user probably knows what he is doing.

@bmwiedemann
Copy link
Member Author

in any case, you could already review/merge the cleanup commit so that I will not have to rebase as much, in case it takes longer (called 'bitrot').

@marcus-h
Copy link
Member

marcus-h commented Jul 27, 2017 via email

@marcus-h
Copy link
Member

marcus-h commented Jul 27, 2017 via email

@marcus-h
Copy link
Member

marcus-h commented Jul 27, 2017 via email

Bernhard M. Wiedemann and others added 3 commits August 12, 2017 22:07
to only call os.path.join once
by using mtime metadata
before checking digests.
This slightly changes the semantic by assuming that modified files
will always have updated timestamps.

With this change it is possible to do osc status
on a checkout of openSUSE:Factory that contains 40GB of source tarballs
in seconds instead of minutes:
time .../osc/osc-wrapper.py status > /dev/null

real    0m33.652s
user    0m32.590s
sys     0m1.060s

Without the patch it took 22x as long:
real    12m14.545s
user    1m50.084s
sys     0m20.566s
@bmwiedemann
Copy link
Member Author

I added a boolean to always calculate digests again - but not integrated into config files / CLI options. can you do that?

@marcus-h
Copy link
Member

marcus-h commented Aug 13, 2017 via email

@marcus-h marcus-h merged commit 47834b3 into openSUSE:master Aug 15, 2017
@marcus-h
Copy link
Member

marcus-h commented Aug 15, 2017 via email

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.

None yet

2 participants