eclipse / xtext-eclipse

xtext-eclipse
Eclipse Public License 2.0
49 stars 73 forks source link

[Bug 574908] Improve performance of Storage2UriMapperJavaImpl in modular project #1775

Closed szarnekow closed 2 years ago

szarnekow commented 2 years ago

Since it is extremely unlikely that the JRE contains sources for which an Xtext builder is supposed to be executed, the JdtTobeBuiltComputer was always filtering the JRE from the build processing. The Storage2UriMapperJavaImpl can do the same. Both share the same implementation to make that decision.

Also replace pessimistic copies of maps by a synchronized collection in the PackageFragmentRootData to avoid unnecessary copies of data.

In an unscientific coarse measurement, the time to init the cache for 500 projects was reduced from 15seconds to 40ms.