lexical-lsp / lexical

Lexical is a next-generation elixir language server
888 stars 82 forks source link

Improve performance under batch operations #826

Closed scohen closed 2 months ago

scohen commented 2 months ago

This commit seeks to improve the performance under batch operations by holding off compilations until after a period of quiescence. Prior, we were building every 100 or so milliseconds, but this would cause builds to happen during batch operations.

Instead, this PR dramatically simplifies the build process to utilize timeouts to detect a quiet period after which builds can commence.

I also found a missed case while transforming diagnostics into elixir that caused crashes that took down the project node. I was unaware that the uri of a diagnostic can be nil (how?!?).

Prior to this PR, mass renames would never finish in emacs, and now they can.