lexical-lsp / lexical

Lexical is a next-generation elixir language server
874 stars 80 forks source link

Speed up indexing by not calling `deps_dir` for every file #646

Closed lukad closed 6 months ago

lukad commented 6 months ago

This significantly speeds up indexing on very large codebases. Brought down indexing time from ~2 hours to ~2 minutes on the project I tested this on.

scohen commented 6 months ago

Well, the reason I made the deps_dir function was to do this, I was mistaken about how anonymous functions are built. Mea culpa. Two hours is a heck of a run, heck, two minutes is a long indexing run.

How big is your codebase?

lukad commented 6 months ago

15k+ elixir files, so it's no surprise that calling into the remote project for every file has such a big impact. Anyways, thanks a lot for lexical. It makes working on such a large codebase so much more enjoyable.

tessi commented 6 months ago

for the love of whatever deity you (not) believe in, thank you @lukad for this PR! And lexical in general for being awesome. This is saving my day on the very same humongous codebase 💜