Skip to content

Commit 2ee6794

Browse files
author
jan
committed
Do not recalculate languiage settings when none are available
For optimisation Sloeber caches language settings. However when the command failed (a list of 0 settings) Sloeber recalculated these settings. This was done to allow to refresh the cache however it does cause a performance hit. Therefore I opted to accept no results as a valid result untill a better method is found.
1 parent 5c1adcf commit 2ee6794

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

io.sloeber.autoBuild/src/io/sloeber/autoBuild/extensionPoint/providers/AutoBuildLanguageSettingsProvider.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,8 +253,9 @@ public List<ICLanguageSettingEntry> getSettingEntries(ICConfigurationDescription
253253
if (discoveryCommand == null || discoveryCommand.isBlank()) {
254254
return LanguageSettingsStorage.getPooledList(list);
255255
}
256+
discoveryCommand=discoveryCommand.trim();
256257
List<ICLanguageSettingEntry> cachedList=myDiscoveryCache.get(discoveryCommand);
257-
if ( cachedList== null || cachedList.size()==0 ) {
258+
if ( cachedList== null ) {
258259
myDiscoveryCache.put(discoveryCommand, runForLanguage(languageId, discoveryCommand, autoConf,
259260
autoConf.getProject(), new NullProgressMonitor()));
260261
}

0 commit comments

Comments
 (0)