Community
Participate
Working Groups
Created attachment 288054 [details] StagingView sampling.png We have a large workspace with a large git repository. After saving a file the UI freezes for several seconds - only when the Stagingview is open. We took stacktraces which point to org.eclipse.egit.ui.internal.staging.StagingView.updateCommitButtons () runninng in the UI thread. We understand that the org.eclipse.jgit.lib.Repository.getRepositoryState () may take a while to inspect the git repository. could it please run in the background and then post the state to the git Staging View after the calculation done?
Created attachment 288055 [details] Git Repository State profiling.png
A colleague had the idea, that the commit button should be disabled insync and only enabled after async state calculation to avoid a false isEnabled state.
Yes, there's way too much going on there. It also queries the state multiple times, and also resolves HEAD, and whatnot. This needs a clean-up to query needed info only once, and if possible cache data it needs between calls. The problem is when to invalidate this cached data and re-query it.
(In reply to Thomas Wolf from comment #3) > The problem is when to invalidate this cached data and re-query it. @Thomas, do you plan any improvements on this for next version? Otherwise i would into it.
I've planned some clean-up in this area in 6.2. Not sure it can be fully resolved, but it should be possible to do better than currently.
(In reply to Thomas Wolf from comment #5) > I've planned some clean-up in this area in 6.2. Not sure it can be fully > resolved, but it should be possible to do better than currently. ok, great, thanks.
ping @Thomas was there any activity in this area?
I added a commit for improvement: https://git.eclipse.org/r/c/egit/egit/+/203698
(In reply to Jörg Kubitz from comment #8) > I added a commit for improvement: > https://git.eclipse.org/r/c/egit/egit/+/203698 this change was merged as c22a3c0acfbd6179b6b6a95e19016564f67edf19