Index files serially again (#157)
parent
6056f39d01
commit
32b01afa90
|
@ -179,8 +179,7 @@ class LanguageServer extends AdvancedJsonRpc\Dispatcher
|
|||
|
||||
$startTime = microtime(true);
|
||||
|
||||
yield Promise\all(array_map(function ($textDocument, $i) use ($count) {
|
||||
return coroutine(function () use ($textDocument, $i, $count) {
|
||||
foreach ($textDocuments as $i => $textDocument) {
|
||||
// Give LS to the chance to handle requests while indexing
|
||||
yield timeout();
|
||||
$this->client->window->logMessage(
|
||||
|
@ -195,8 +194,7 @@ class LanguageServer extends AdvancedJsonRpc\Dispatcher
|
|||
"Error parsing file {$textDocument->uri}: " . (string)$e
|
||||
);
|
||||
}
|
||||
});
|
||||
}, $textDocuments, array_keys($textDocuments)));
|
||||
}
|
||||
|
||||
$duration = (int)(microtime(true) - $startTime);
|
||||
$mem = (int)(memory_get_usage(true) / (1024 * 1024));
|
||||
|
|
Loading…
Reference in New Issue