latex-lsp / texlab

An implementation of the Language Server Protocol for LaTeX
GNU General Public License v3.0
1.49k stars 51 forks source link

Use LaTeX file list in project detection #1160

Closed pfoerster closed 1 month ago

pfoerster commented 1 month ago

Adds a parser for the .fls file that lists the working directory and all files processed during compilation. This can aid as a fallback when the regular syntax-based project detection fails due to macro definitions.

Fixes #1145.

clason commented 1 month ago

For larger projects, this can lead to a significant regression in startup time (I have one with a ~2300 line .fls file, for which texlab now needs ~25s to spin up where it was near instant (<1s) before -- on the same project!)

Can this be enabled conditionally, or made opt-in/out?

pfoerster commented 1 month ago

@clason Does https://github.com/latex-lsp/texlab/pull/1164 restore the original startup time?

clason commented 1 month ago

Yes, it does, thank you!

(For the record, I'd be fine with it being opt-out; I suspect that projects such as this are the exception rather than the rule -- although probably not so rare.)

pfoerster commented 1 month ago

For the record, I'd be fine with it being opt-out; I suspect that projects such as this are the exception rather than the rule -- although probably not so rare.

For now, I'd rather keep it fast and enable it by default once it's fast enough that it doesn't impact performance (that much).