Kill and restart the codehint worker thread every 30 hint requests.

This avoids some memory leaks that we were encountering.  Still looking into those, but this should at least stabilize things and prevent the memory from growing so much it crashes brackets.

To avoid a noticeable performance hit when we restart the worker, we instead start a new worker, and only switch to it after it has finished intializing (including priming the pump).  So when we switch between the old and new worker it should be unoticeable to the user.

Had to move around a lot of code in ScopeManager - there are not a lot of actual changes, but the diff is messy due to this.
This commit is contained in:
Erik Tierney committed 2013-05-29 15:44:01 -04:00
1 parent 2b8a013678
commit 6e7c1cee3a
2 files changed
+624 -513

No files matched your search

@@ -47,6 +47,7 @@ define(function (require, exports, module) {
exports.TERN_PRIME_PUMP_MSG = TERN_PRIME_PUMP_MSG;
exports.TERN_GET_GUESSES_MSG = TERN_GET_GUESSES_MSG;
exports.TERN_UPDATE_FILE_MSG = TERN_UPDATE_FILE_MSG;
exports.TERN_WORKER_READY = TERN_WORKER_READY;
});
File diff suppressed because it is too large. Load diff