Skip to content

consult-buffer slow in directories with many entries due to hidden project sources #1185

Answered by minad
hpfr asked this question in Q&A
Discussion options

You must be logged in to vote

The problem here is that Consult assumes that project-current is very cheap. (Recently Emacs got a project-mode-line which makes the same assumption, even worse project-current is executed during redisplay!)

Unfortunately project.el has its limitations and the assumption doesn't really hold. I always wondered why performance of all the project functions is not a higher priority, in particular determining the project root. One could imagine some caching mechanism. This is also what I suggest for your use case. Use a custom project root function which bails out quickly in guix directories or which implements its own caching. I also use my own project root function which bails out in slow re…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@hpfr
Comment options

@minad
Comment options

Answer selected by hpfr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #1184 on February 16, 2025 21:37.