This repository has been archived by the owner on Sep 6, 2021. It is now read-only.
[js code hints] Kill and restart the codehint worker thread every 30 hint requests. #4025
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.