1
0
Fork 0

Index files serially again

pull/157/head
Felix Becker 2016-11-17 22:04:53 +01:00
parent 601c9ad997
commit 71608b1f45
1 changed files with 14 additions and 16 deletions

View File

@ -179,8 +179,7 @@ class LanguageServer extends AdvancedJsonRpc\Dispatcher
$startTime = microtime(true); $startTime = microtime(true);
yield Promise\all(array_map(function ($textDocument, $i) use ($count) { foreach ($textDocuments as $i => $textDocument) {
return coroutine(function () use ($textDocument, $i, $count) {
// Give LS to the chance to handle requests while indexing // Give LS to the chance to handle requests while indexing
yield timeout(); yield timeout();
$this->client->window->logMessage( $this->client->window->logMessage(
@ -195,8 +194,7 @@ class LanguageServer extends AdvancedJsonRpc\Dispatcher
"Error parsing file {$textDocument->uri}: " . (string)$e "Error parsing file {$textDocument->uri}: " . (string)$e
); );
} }
}); }
}, $textDocuments, array_keys($textDocuments)));
$duration = (int)(microtime(true) - $startTime); $duration = (int)(microtime(true) - $startTime);
$mem = (int)(memory_get_usage(true) / (1024 * 1024)); $mem = (int)(memory_get_usage(true) / (1024 * 1024));