Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[win] slow WorkingSetManager.addProject #35

Open
jukzi opened this issue Oct 23, 2023 · 5 comments
Open

[win] slow WorkingSetManager.addProject #35

jukzi opened this issue Oct 23, 2023 · 5 comments

Comments

@jukzi
Copy link

jukzi commented Oct 23, 2023

While creating eclipse platform workspace ~ 40 of ~ 50 sec are burned in RepositoryPredicateImpl.getRepoDirAbsolutePath() on my computer

Stack:
image

@merks
Copy link
Contributor

merks commented Oct 23, 2023

Which OS?

@jukzi
Copy link
Author

jukzi commented Oct 23, 2023

Windows 10

@merks
Copy link
Contributor

merks commented Oct 23, 2023

I suppose it's walking up the parent folders and not finding a .git folder anywhere but at some point is maybe hitting a network drive that is very slow:

private Path getRepoDirAbsolutePath(IProject project)
{
if (project != null)
{
RepositoryProvider provider = RepositoryProvider.getProvider(project);
if (provider == null)
{
URI locationURI = project.getLocationURI();
if (locationURI != null && "file".equals(locationURI.getScheme())) //$NON-NLS-1$
{
org.eclipse.emf.common.util.URI emfURI = org.eclipse.emf.common.util.URI.createURI(locationURI.toString());
for (File parent = new File(emfURI.toFileString()); parent != null && parent.isDirectory(); parent = parent.getParentFile())
{
File gitFolder = new File(parent, ".git"); //$NON-NLS-1$
if (new File(gitFolder, "index").exists()) //$NON-NLS-1$
{
return parent.toPath();
}
}
}
}

I'm not sure what to do about. I don't even expect any of the folders not have providers in the first place...

@jukzi
Copy link
Author

jukzi commented Oct 23, 2023

According to the stacktrace its not a network but only the windows filesystem. i have not analysed it but typically such timings only appear if the same files are queried over and over - for example for every project do the same query again. (multiple projects in the repo)

@merks
Copy link
Contributor

merks commented Oct 23, 2023

That's good to know. Yes, I'm sure it's being done over and over again for each project, so some "transient" caching would likely help...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants