| Summary: | Replace with -> File in Git index slow for large repository | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Technology] EGit | Reporter: | Robert Munteanu <robert.munteanu> | ||||
| Component: | Core | Assignee: | Project Inbox <egit.core-inbox> | ||||
| Status: | RESOLVED WORKSFORME | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | christian.halstrick, daniel_megert, jens.baumgart, markus.kell.r, remy.suen, robin.rosenberg | ||||
| Version: | 0.11 | ||||||
| Target Milestone: | --- | ||||||
| Hardware: | PC | ||||||
| OS: | Linux | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Robert Munteanu
Created attachment 190132 [details]
YourKit snapshot taken during the discard changes operation
I only timed part of it, as I got bored, but the root cause is clear.
Tried here with my latest fixes in Gerrit on a repo with 80k files, 40k tracked and that took about a minute (admittedly on SSD disk) so I think the issue is no longer valid. C Git is still quite a lot faster, but 1 minute is still a small time compared to what git will do. A faster way is usually to do a hard reset, but typically accomplished the same thing. There are some differences like assume-valid, which replace will ignore and overwrite anyway, i.e. replace is a little "harder" than a hard reset. I did a test here and it turn out C git reset files with the assume valid flag set, so maybe we should do the same. Reset also operates on the whole repository. C Git is also a bit faster even though it forcefully replaces all files without checking the index. |