Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 337081

Summary: Right-click context menu can take a long time to show in History View
Product: [Technology] EGit Reporter: <h1055071>
Component: UIAssignee: Mathias Kinzler <mathias.kinzler>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: caniszczyk, mathias.kinzler, mn, robin
Version: 0.11Keywords: performance
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description CLA 2011-02-13 18:29:47 EST
History View - If I select a Commit that has a lot of files committed for it (say about 400) and then right-click to invoke the context menu there is a long delay. Sometimes the context menu doesn't show at all.
Comment 1 Mathias Kinzler CLA 2011-02-15 13:26:56 EST
I debugged this some. The culprit here is not building of the context menu, but the method format() of the CommitMessageViewer. This appears to have beome dramatically slower.
It is called from CommitMessageViewer.setInput() which in turn is called every time the context menu is opened.
Of course we could simply check if the input is == the previous input here, but I guess we should investigate the performance issues here rather than hiding the problem...
I tested with the extjs repository

http://github.com/probonogeek/extjs.git
Comment 2 Mathias Kinzler CLA 2011-02-16 08:18:00 EST
Ok, I checked 0.11 against 0.10 and there doesn't seem to be any performance
degradation since then, so it doesn't look like a new issue.
We should try to update the CommitMessageViewer asynchronously so that the UI does not have to wait for formatting the diffs of all the files.
I tried this quickly but failed dramatically with RuntimeExceptions deep down in the JGit code. The reason for this is most likely that there are TreeWalk instances being shared betweeen the CommitGraphTable, the CommitFileDiffViewer, and the CommitMessageViewer.
Perhaps another approach would be better: initially, we don't render any Diff, only showing the commit meta data (author, message...). Only when the user selects a file from the file list, the diff for this file is rendered and shown in the CommitMessageViewer.
The user can switch back to the commit meta data by clicking in the CommitGraphTable again.
The UI responsiveness of this is then hopefully good enough without spawning asynchronous jobs and all that...
Comment 3 Mathias Kinzler CLA 2011-02-17 11:48:27 EST
Code review at

http://egit.eclipse.org/r/#change,2522

and its ancestors.
Comment 4 Mykola Nikishov CLA 2012-03-03 11:12:41 EST
[Batch change] Remove passed Target Milestones

If anyone on CC list is going to fix/implement this, feel free to assign a new, post-1.3/2.0, target milestone.
Comment 5 Robin Stocker CLA 2013-09-27 12:38:48 EDT
The changes for this have been merged a long time ago, closing.