Open abose opened 9 years ago
Marked as high priority as this could halve the cache size in large projects.
@petetnt I'd like to work on this. Can you please provide some hint about how to get started with this?
@sahildua2305 The search cache is initialized in FindInFiles.js#L838 which calls ProjectManager.getAllFiles
which calls ProjectModel.prototype.getAllFiles
here which leads to the situation which @abose describes.
There are some utils you can use to see if Instant Search is enabled here, but I think it might need some additional checks to see that the file cache is actually there before skipping it in the ProjectModel
.
Not sure I understand it correctly. Where should the check (to find if file cache is already there) go?
Not quite sure yet myself either 😹 I think the answer lies in either FindInFiles
or ProjectModel
.
Ok! I will look into it. Let me know if you find out something on this though. Thanks 😄
When instant search file cache is present, brackets doesn't need to keep the file cache. This will free up a lot of memory in the brackets side. Currently instant search keeps the file cache in node. currently ProjectModel.prototype.getAllFiles will issue a this._getAllFilesCache - which is a double cacheing [the other file cache being in node] that could be avoided.