cquery icon indicating copy to clipboard operation
cquery copied to clipboard

Cache update is too aggressive

Open Yanpas opened this issue 7 years ago • 2 comments

I use repo with about 5k c++ files, and every one-two days cquery starts a jobs of reindexing all source code base. What's the algorithm of deciding when to refresh the cache? (when some extensions get updates and I reload a window)

I guess that modifying some root include file, like vector or string will likely to cause almost whole index rebuild, but that's most likely not the case.

Yanpas avatar Oct 04 '18 11:10 Yanpas

By default cquery reindexes in two cases. At the start and every time you save a file. @jacobdufault will correct me if I'm wrong, but I think cquery checks thte file modification time to figure out if it really needs to be reindexed.

bstaletic avatar Oct 04 '18 11:10 bstaletic

I think calculatin hash-sum of each file and then recompiling each file (and dependant) only if hash sum has changed will be optimal solution.

And despite hash sum of a file compile command should be compared too.

I don't know, maybe it works this way now and if so, then I'm just unlucky to get huge modifications every 100 revisions.

Yanpas avatar Nov 14 '18 21:11 Yanpas