mirror of
https://github.com/sigmasternchen/xtext-core
synced 2025-03-15 16:28:56 +00:00
[lsp] some build performance tuning
When a resource is loaded for the first time, there is no need to unload it between pre-indexing and build
This commit is contained in:
parent
12991092f9
commit
7ebd587d0c
2 changed files with 2 additions and 3 deletions
|
@ -94,7 +94,7 @@ class IncrementalBuilder {
|
|||
val result = indexer.computeAndIndexAffected(request, context)
|
||||
request.cancelIndicator.checkCanceled
|
||||
for (delta : result.resourceDeltas) {
|
||||
if (unloaded.add(delta.uri)) {
|
||||
if (delta.old !== null && unloaded.add(delta.uri)) {
|
||||
unloadResource(delta.uri)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -259,8 +259,7 @@ public class IncrementalBuilder {
|
|||
this._operationCanceledManager.checkCanceled(this.request.getCancelIndicator());
|
||||
List<IResourceDescription.Delta> _resourceDeltas = result.getResourceDeltas();
|
||||
for (final IResourceDescription.Delta delta : _resourceDeltas) {
|
||||
boolean _add_2 = unloaded.add(delta.getUri());
|
||||
if (_add_2) {
|
||||
if (((delta.getOld() != null) && unloaded.add(delta.getUri()))) {
|
||||
this.unloadResource(delta.getUri());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue