Closed Therzok closed 6 years ago
The reason this is problematic is that there are folders in the recursive scan which don't match any addin, i.e. ../AddIns, ../AddIns/AspNet/CodeTemplates, and every folder which doesn't match an addin will trigger a full database cache iteration.
@slluis so, we have to define directories to exclude? The main problem with the code is that we're probing for addin cache data for directories which are not addins.
No, we have to make the file database more efficient in detecting that data doesn't exist for a path. I have an idea about how to do it.
It should do the following: 1) Check if data file exists:
file_(n+1).data
, go to 1)Besides that, it needs a strategy to delete old unused files, and avoid unbounded directory growth. But this may be fixed separately.
Updated.
The format of the addin cache data is something like below: Users_therzok_Work_md_monodevelop_main_build_AddIns_MonoDevelop.AzureFunctions_azure-functions-cli-66a932fb_nb_abf27ece.data
That means that the code which is removed was looking for something that would match: