| Summary: | [server][log] Improve the performance of Git Log | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [ECD] Orion | Reporter: | Szymon Brandys <Szymon.Brandys> | ||||
| Component: | Git | Assignee: | Tomasz Zarna <tomasz.zarna> | ||||
| Status: | RESOLVED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | john.arthorne, mamacdon, simon_kaegi | ||||
| Version: | 0.2 | ||||||
| Target Milestone: | 0.5 M1 | ||||||
| Hardware: | PC | ||||||
| OS: | Windows XP | ||||||
| Whiteboard: | |||||||
| Bug Depends on: | 343506, 357774, 358214, 370132 | ||||||
| Bug Blocks: | |||||||
| Attachments: |
|
||||||
|
Description
Szymon Brandys
This is not going to be as easy as I initially expected. I was aware that JGit porcelain API for git-log is missing params suitable for paging (the reason why Szymon implemented the logic as described in comment 0), but I hoped we can achieve that by using a lower lever API. Unfortunately, even though CGit git-log has params that are useful here (i.e. --skip and --n) they are not available in JGit. The problem here is that both org.eclipse.jgit.pgm.Log and org.eclipse.jgit.api.LogCommand use RevWalk which walks a commit graph. It's an Iterable so I guess the best approach would be to modify the way it returns commits (eg. by providing a org.eclipse.jgit.revwalk.Generator). (In reply to comment #0) > the server implementation gets the full log (what takes time) Creating the walker doesn't seem to be time-consuming, it's the walk itself (i.e. calling next()) that may cause timeouts. Having said that, I was quite surprised hearing that even git-logs with few commits[1] can time out. [1] those little git log widgets on the Git Status page Another way of improving Git Log is caching the result, see bug 339846. Fixing bug 343506 and bug 358214 gave the Git Log enough boost, so we can postpone the other two (ie. bug 339846, bug 357774) until 0.4. Fixed with f94cba36c46d09f0471491a549390231c11011ee and new options for LogCommand (see bug 357774). Created attachment 209201 [details]
mylyn/context/zip
I'm reopening this one, waiting for a fix for bug 370132 in JGit. For more details see bug 368567. |