project import times & D7745: KDevelop (full) project parsing: defer until all projects have been loaded.
René J.V. Bertin
rjvbertin at gmail.com
Sat Sep 16 08:29:55 UTC 2017
> Now that KDevelop got merged with KDevPlatform, the project count in the generated solution reached ~500. Loading such solution takes minutes on my machine, so I imagine it would take really longer if there would be a parser running in the background.
It seems that using cmake server mode is also to blame for long project import times. On my Linux rig the same project (the 5.2 branch of kdevelop itself) takes over 4x longer to import in a build of that 5.2 branch vs. an otherwise identical build of 5.1/head. Specifically, the pure import phase (+ parsing 10 or so open files; creating dirwatchers deferred and full project parsing turned off) takes about 1 minute in v5.1.40 and 12-14 seconds in v5.1.2.5 .
I hope that whatever benefits come from using cmake server mode justify that cost. If I interpret the code correctly there still is a fallback to the old import method for cmake versions that don't support server mode.
If there's no way to speed up server-mode import (for instance by reducing the sh*load of messages that cmake sends that are being ignored) then maybe we should think of a way to bypass it. It's one thing if you have to wait "a bit" longer for a project to load if you're going to be doing serious development on it and can thus use all extra metadata (or whatever) possible. It's something else altogether having to wait that much longer if you just want to open open for a quick peek while working on another project.
Maybe a "Quick Import" feature could make sense (action in the Project menu and/or a checkbox in the open file dialog when starting an import), there might be other projectmanagers that have a mode where they take significantly less time?
R.
More information about the KDevelop-devel
mailing list