On Nov 4, 2008, at 3:25 PM, mvlcek wrote:
I found the cause of the delay when debugging gradle and it's not the
repository:
- my project is at /media/sda1/work/...
- however, there are also other smb mounts like /media/share1, ...,
which
are not reachable any more, when I pull my network cable.
- gradle searches for settings in all parent directories by getting
directory lists and when asking for the files/directories in /media
it takes
a LONG time (because of non-reachable mounts).
So, no big problem, but I would replace the method in
ParentDirSettingsFinderStrategy with this more efficient one, which
does not
get all files in the directories (and would not cause the above
delay):
protected File findBeyondCurrentDir(StartParameter
startParameter) {
File searchDir = startParameter.getCurrentDir
().getParentFile();
while (searchDir != null && startParameter.isSearchUpwards
()) {
File settingsFile = new File(searchDir,
startParameter.getSettingsFileName());
if (settingsFile.exists() && settingsFile.isFile()) {
return settingsFile;
}
searchDir = searchDir.getParentFile();
}
return null;
}
Thanks a lot. I have filed an issue for this: http://
jira.codehaus.org/browse/GRADLE-301
This should make it into 0.5.
- Hans
--
Hans Dockter
Gradle Project lead
http://www.gradle.org
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email