-
-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Initialization of extension is very slow for large projects #757
Comments
So what you're seeing there is an experimental initialisation process I added a while back that basically tries to generate all the .mod/.smod files for your linter. You should be able to disable this behaviour with The only thing that really needs to happen is to figure out the dependency graph (what fpm does) and pass that to the linter. The problem is that fpm cannot be easily installed on systems + it's lacking this functionality currently.
Serialising the dependency graph might be a good idea, but then you also have to take care of validating the cache's state which is not trivial. |
In general, the tools to do this exist. Either fortls, fpm or some other Python package, the problem is that they need a bit of polishing to accomplish this and more importantly I don't have much free time for this. I will see if I can squeeze some of that stuff into another proposal but for now I think attention is diverted to STF projects. |
I see! When I turned off |
Happy that worked out. BTW the initialisation stuff will be disabled by default in the official release. Same as the options under |
Is there an existing issue for this?
Description
Not really a bug and not really a feature, but more of an annoyance. In a somewhat recent update of Modern Fortran the extension started to have fortls(?) analyze all Fortran files each time a folder is opened. Fortls functionality is not available until this has been completed and for large projects this takes a very long time. See screencast below.
Screenshots
Expected Behaviour
Analyzing all source files is probably the right thing to do, but with the current performance I think it takes too long until fortls features are available. I would assume that in many situations, a large number of the files are actually unchanged since last time VSCode started. Maybe it would be possible to speed up the initialization by serializing the fortls data structure once initialized and then deserialize it the next time VSCode starts? This would require keeping track of which files has changed e.g. with modification timestamps or a hash of the content though.
Version of Modern Fortran
v3.4.2022112202
Version of Visual Studio Code
v1.73.1
Platform and Architecture
Linux
Additional Information
No response
The text was updated successfully, but these errors were encountered: