Bug 553124 - [history] "refs/**/[CURRENT-BRANCH]" filter calls Repository.getBranch() for each ref
Summary: [history] "refs/**/[CURRENT-BRANCH]" filter calls Repository.getBranch() for ...
Status: RESOLVED FIXED
Alias: None
Product: EGit
Classification: Technology
Component: UI (show other bugs)
Version: 5.6   Edit
Hardware: PC All
: P3 critical (vote)
Target Milestone: 5.6   Edit
Assignee: Andrey Loskutov CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-11-16 16:57 EST by Thomas Wolf CLA
Modified: 2019-11-17 11:14 EST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Wolf CLA 2019-11-16 16:57:04 EST
The "refs/**/[CURRENT-BRANCH]" filter calls Repository.getBranch() for each ref.

This should call getBranch() exactly once when a GitHistoryWalk is started.
Comment 1 Thomas Wolf CLA 2019-11-16 17:43:37 EST
This *must* be fixed before 5.6. getBranch() accesses the user config (in getPackedRefs(), to get the core.trustFolderStat setting), so this has the potential to delay the history computation very long if the user home directory is on a network disk.
Comment 2 Andrey Loskutov CLA 2019-11-17 05:50:12 EST
(In reply to Thomas Wolf from comment #0)
> The "refs/**/[CURRENT-BRANCH]" filter calls Repository.getBranch() for each
> ref.

I can't see it in the debugger due bug 553119. Once we fix bug 553119, this will be a problem.

I have a patch for both bugs, will push soon.
Comment 3 Thomas Wolf CLA 2019-11-17 05:54:35 EST
Great, thanks.
Comment 4 Eclipse Genie CLA 2019-11-17 06:09:39 EST
New Gerrit change created: https://git.eclipse.org/r/152812
Comment 5 Eclipse Genie CLA 2019-11-17 11:11:38 EST
Gerrit change https://git.eclipse.org/r/152812 was merged to [master].
Commit: http://git.eclipse.org/c/egit/egit.git/commit/?id=8817bd383f942fe11e400186ae5f9488b0d51370