[Qt-creator] about the clang parser backend

Nikolai Kosjar Nikolai.Kosjar at qt.io
Tue Dec 4 15:32:21 CET 2018


On 12/4/18 10:04 AM, René J.V. Bertin wrote:
> One advantage I see for using a server/client backend approach instead of calling into libclang directly is that several IDE instances (sessions) could share the same server, thus decreasing memory overhead (clang can be quite memory hungry). Is there a technical reason why Creator doesn't do this but instead starts session-specific backends(s)?

There is no technical reason for this. The session-specific approach was 
just the simplest one to implement.

I'm also not sure how popular the multiple-qtcreator-instances-running 
case is as it can be problematic for settings.

Whether you can save a significant amount of memory with a 
cross-session-backend depends on what data you keep in the backend and 
the degree of precision you go for.

For us, as the clangbackend manages the translation units of the files 
you have open in the editor, a translation unit is the dominating unit 
consuming memory and each translation unit is quite separate/isolated 
from another (that's how libclang works), and clangbackend does not deal 
with project-wide indexing, there is not much that could be shared right 
now.

Nikolai


More information about the Qt-creator mailing list