[Qt-creator] Clang Code Model Questions

Mike Jackson imikejackson at gmail.com
Wed Nov 18 17:21:34 CET 2015


> On Nov 18, 2015, at 10:13 AM, Cristian Adam <cristian.adam at gmail.com> wrote:
> 
> On Tue, Nov 17, 2015 at 5:50 PM, Mike Jackson <imikejackson at gmail.com <mailto:imikejackson at gmail.com>> wrote:
> 
> > On Oct 30, 2015, at 7:32 AM, Nikolai Kosjar <nikolai.kosjar at theqtcompany.com <mailto:nikolai.kosjar at theqtcompany.com>> wrote:
> >
> > Hi!
> >
> > On 10/21/2015 03:33 PM, Mike Jackson wrote:
> >> I have been using the nightly builds of 3.5.1 and now 3.6.0 and it
> >> seems the editor is still running into hanging issues when the
> >> source file has anything other than trivial codes. I started trying
> >> to profile the code in an attempt to learn how/where the issue might
> >> be and if it is our own code base that is causing the issues.Most I
> >> have noticed is that “clangbackend” spins up and QtCreator hangs with
> >> a spinning beach ball for 5~10 seconds overtime I try to have a
> >> completion pop up. This makes the editor pretty much unusable.
> >
> > When exactly does it start to hang? If you trigger completion? Is it
> > reproducible? The communication with the backend is asynchronous, it
> > shouldn't block the UI. Are you sure that the blocking does not occur
> > with the built-in code model for the same code and the same use case?
> >
> > Please provide answers to this questions in a bug report.
> >
> >> I just wanted to try to get a feel for where QtCreator was going and
> >> what the timelines are so that I can gauge how I will develop codes
> >> going forward.
> >
> > The current focus lies on proper/usable highlighting, diagnostics and completions from clang. Later indexing will be addressed, but that's another story. For concrete questions, just ask.
> >
> >> I generally like what I see with the newer features being added to
> >> QtCreator and want to keep using it but our code base, for what ever
> >> reason, just seems to give the clang code model fits when trying to
> >> complete our functions.
> >
> > Again, the best you can do is to create proper bug reports.
> >
> > Nikolai
> 
> I am still struggling with how to put in a report on this topic. Something other than  “Hey the editor with Clang code model is slow”. The fact that I am not seeing anyone else report this same thing and the fact that the editor with Clang code model remains basically unusable on a nightly basis tells me that it must just be our project. Maybe our project brings in so many outside projects that it over whelms the code model and the underlying assumptions? I can put in a bug report but I have not found a way to reproduce my issues besides “ .. try our project.. “.
> 
> 
> 
> If you go to Tools -> C++ -> Inspect C++ Code Model... how many files do you have for the "Global/Indexing Snapshot"?
> How many files do you have for the "Current Editor's Snapshot" when you try to get code completion in a file?
> 
> How much memory does "clangbackend" executable use? What does "clangbackend" when the 5-10 seconds of Qt Creator inactivity?
>  
> 
> Cheers,
> Cristian.

Global/Indexing Snapshot: 5938 documents
Current Editors Snapshot: 712 documents

ClangBackend uses about 170 MB at peak

ClangBackend spins 100%CPU while QtCreator is spinning a beach ball.
Here is a screen shot from the “Instruments” application on OS X that sampled the Clangbackend process while I was typing. I can send the entire instruments file if needed.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/qt-creator/attachments/20151118/f9c46879/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screen Shot 2015-11-18 at 11.11.45 AM.png
Type: image/png
Size: 262363 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/qt-creator/attachments/20151118/f9c46879/attachment.png>


More information about the Qt-creator mailing list