Repository navigation
Stop re-indexing on every find-file in projects with a .projectile - #2196
Merged
Merged
Conversation
projectile-maybe-invalidate-cache compared .projectile against the persistent cache file, and file-newer-than-file-p is true when that file doesn't exist. Since 2.9.0 made the cache in-memory by default no such file is written, so every find-file in a project with a .projectile threw the cache away and re-indexed. The in-memory cache already records when it was filled, so compare against that, fall back to the cache file only when nothing is cached in memory, and treat no cache at all as nothing to invalidate.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The dirconfig staleness check compared
.projectileagainst the persistent cache file, which the default in-memory cache never writes, so it always said stale. It now uses the time the in-memory cache was filled. That time is in whole seconds, so an edit in the same second as indexing costs one extra re-index rather than risking a missed edit.Fixes #2193
eldev test)M-x checkdocwarnings