Reduce maintenance overhead of the path cache. #1064
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.
Instead of setting a timeout each time the cache is accessed, set only one
timeout at a time, and keep a record of which items it should be updating.
This seems to significantly improve performance in our use-case (note that the overhead of the old version is in the many many timeout functions, so you wouldn't notice it when drawing a single scene – but it adds up if you're progressively drawing a scene over time.)