You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Check memory usage only if jedi is used and reduce frequency of these checks (#1510)
Fixes#1277
* Use settimeout instead of setinterval (the requests were getting piled up with setinterval).
* I've reduced the frequency of checks from 2 seconds to 15 seconds.
* Check memory usage only if jedi is used>
Reduce the frequency within which the memory usage of the language server is checked, also ensure memory usage is not checked unless language server functionality is used.
this.logger.logWarning(`IntelliSense process memory consumption exceeded limit of ${limit} MB and process will be restarted.\nThe limit is controlled by the 'python.jediMemoryLimit' setting.`);
this.logger.logWarning(`IntelliSense process memory consumption exceeded limit of ${limit} MB and process will be restarted.\nThe limit is controlled by the 'python.jediMemoryLimit' setting.`);
263
+
awaitthis.restartLanguageServer();
264
+
}
247
265
}
266
+
267
+
deferred.resolve();
248
268
});
269
+
270
+
returndeferred.promise;
249
271
}
250
272
251
273
@swallowExceptions('JediProxy')
@@ -374,7 +396,7 @@ export class JediProxy implements Disposable {
0 commit comments