Re: [Qt-creator] clangbackend slow code completion

2018-02-14 Thread Steve Atkins

> On Feb 14, 2018, at 5:00 AM, Guenter Schwann  wrote:
> 
> On Mittwoch, 14. Februar 2018 13:47:51 CET Konstantin Tokarev wrote:
>> 14.02.2018, 03:04, "Steve Atkins" :
 On Feb 13, 2018, at 4:00 PM, Nikos Chantziaras  wrote:
 
 If you have the "clang-tidy" checks enabled, disable them, or only use 1
 or 2 of them. That feature is extremely slow.> 
>>> That fixes it, thanks. Bit of a shame, as they were rather a nice feature.
>> 
>> There are 2 approaches to this problem:
>> * use faster CPU
>> * make clang-tidy itself faster
> 
> Or
> * run clang-tidy/clazy "outside" of the code-model in a separate step in 
> QtCreator?
> * run clang-tidy/clazy only when triggered (menu entry - like the for example 
> the clang power tools in VS)

Yes, something like that seems the only way clang-tidy + Creator will be usable,
unless clang-tidy gets at least an order of magnitude faster or 30GHz processors
hit the market.

Asynchronous code checks would be a killer feature.

(I'd assumed that was the way it would be implemented - that clang tidy
checks wouldn't be related to basic completion - otherwise I'd have thought
to try turning them off to fix completion).

> Btw. - it would be nice if the QtCreator clang-tidy plugin would (optionally) 
> make use of a .clang-tidy config file (to share it with clang power tools for 
> example).

Yes, and that'd let you be more selective with which checks to enable
too.

Cheers,
  Steve
___
Qt-creator mailing list
Qt-creator@qt-project.org
http://lists.qt-project.org/mailman/listinfo/qt-creator


Re: [Qt-creator] clangbackend slow code completion

2018-02-14 Thread Marco Bubke
We are looking into implementing the language server protocol but that is not 
so important now.


For the speed problem, we have an idea how we can improve it but we don't want 
to add it in 4.6 because it could can break something.


From: Qt-creator <qt-creator-bounces+marco.bubke=qt...@qt-project.org> on 
behalf of Nikos Chantziaras <rea...@gmail.com>
Sent: Wednesday, February 14, 2018 6:05:36 PM
To: qt-creator@qt-project.org
Subject: Re: [Qt-creator] clangbackend slow code completion

Shouldn't all this actually be using clangd?

https://clang.llvm.org/extra/clangd.html


On 14/02/18 15:08, Ivan Donchevskii wrote:
>
> Btw. - it would be nice if the QtCreator clang-tidy plugin would
> (optionally)
> make use of a .clang-tidy config file (to share it with clang power
> tools for
> example).
>
> It's definitely in our plans. We've already discussed how we can support
> different ways of configuring tidy (with file and with ui options).
> Making separate tool for tidy/clazy (to run them like static analyzer on
> the whole project) is also in plans but we have to solve some technical
> things on the way to it.
>
> Regards,
> Ivan

___
Qt-creator mailing list
Qt-creator@qt-project.org
http://lists.qt-project.org/mailman/listinfo/qt-creator
___
Qt-creator mailing list
Qt-creator@qt-project.org
http://lists.qt-project.org/mailman/listinfo/qt-creator


Re: [Qt-creator] clangbackend slow code completion

2018-02-14 Thread Nikos Chantziaras

Shouldn't all this actually be using clangd?

https://clang.llvm.org/extra/clangd.html


On 14/02/18 15:08, Ivan Donchevskii wrote:


Btw. - it would be nice if the QtCreator clang-tidy plugin would 
(optionally)
make use of a .clang-tidy config file (to share it with clang power 
tools for

example).

It's definitely in our plans. We've already discussed how we can support 
different ways of configuring tidy (with file and with ui options).
Making separate tool for tidy/clazy (to run them like static analyzer on 
the whole project) is also in plans but we have to solve some technical 
things on the way to it.


Regards,
Ivan


___
Qt-creator mailing list
Qt-creator@qt-project.org
http://lists.qt-project.org/mailman/listinfo/qt-creator


Re: [Qt-creator] clangbackend slow code completion

2018-02-14 Thread Ivan Donchevskii

Btw. - it would be nice if the QtCreator clang-tidy plugin would (optionally)
make use of a .clang-tidy config file (to share it with clang power tools for
example).

It's definitely in our plans. We've already discussed how we can support 
different ways of configuring tidy (with file and with ui options).
Making separate tool for tidy/clazy (to run them like static analyzer on the 
whole project) is also in plans but we have to solve some technical things on 
the way to it.

Regards,
Ivan


From: Qt-creator <qt-creator-bounces+ivan.donchevskii=qt...@qt-project.org> on 
behalf of Guenter Schwann <guenterli...@schwann.at>
Sent: Wednesday, February 14, 2018 2:00 PM
To: qt-creator@qt-project.org
Subject: Re: [Qt-creator] clangbackend slow code completion

On Mittwoch, 14. Februar 2018 13:47:51 CET Konstantin Tokarev wrote:
> 14.02.2018, 03:04, "Steve Atkins" <st...@blighty.com>:
> >>  On Feb 13, 2018, at 4:00 PM, Nikos Chantziaras <rea...@gmail.com> wrote:
> >>
> >>  If you have the "clang-tidy" checks enabled, disable them, or only use 1
> >> or 2 of them. That feature is extremely slow.>
> > That fixes it, thanks. Bit of a shame, as they were rather a nice feature.
>
> There are 2 approaches to this problem:
> * use faster CPU
> * make clang-tidy itself faster

Or
* run clang-tidy/clazy "outside" of the code-model in a separate step in
QtCreator?
* run clang-tidy/clazy only when triggered (menu entry - like the for example
the clang power tools in VS)

Btw. - it would be nice if the QtCreator clang-tidy plugin would (optionally)
make use of a .clang-tidy config file (to share it with clang power tools for
example).

Regards
Guenter

___
Qt-creator mailing list
Qt-creator@qt-project.org
http://lists.qt-project.org/mailman/listinfo/qt-creator
___
Qt-creator mailing list
Qt-creator@qt-project.org
http://lists.qt-project.org/mailman/listinfo/qt-creator


Re: [Qt-creator] clangbackend slow code completion

2018-02-14 Thread Guenter Schwann
On Mittwoch, 14. Februar 2018 13:47:51 CET Konstantin Tokarev wrote:
> 14.02.2018, 03:04, "Steve Atkins" :
> >>  On Feb 13, 2018, at 4:00 PM, Nikos Chantziaras  wrote:
> >> 
> >>  If you have the "clang-tidy" checks enabled, disable them, or only use 1
> >> or 2 of them. That feature is extremely slow.> 
> > That fixes it, thanks. Bit of a shame, as they were rather a nice feature.
> 
> There are 2 approaches to this problem:
> * use faster CPU
> * make clang-tidy itself faster

Or
* run clang-tidy/clazy "outside" of the code-model in a separate step in 
QtCreator?
* run clang-tidy/clazy only when triggered (menu entry - like the for example 
the clang power tools in VS)

Btw. - it would be nice if the QtCreator clang-tidy plugin would (optionally) 
make use of a .clang-tidy config file (to share it with clang power tools for 
example).

Regards
Guenter

___
Qt-creator mailing list
Qt-creator@qt-project.org
http://lists.qt-project.org/mailman/listinfo/qt-creator


Re: [Qt-creator] clangbackend slow code completion

2018-02-14 Thread Konstantin Tokarev


14.02.2018, 03:04, "Steve Atkins" :
>>  On Feb 13, 2018, at 4:00 PM, Nikos Chantziaras  wrote:
>>
>>  If you have the "clang-tidy" checks enabled, disable them, or only use 1 or 
>> 2 of them. That feature is extremely slow.
>
> That fixes it, thanks. Bit of a shame, as they were rather a nice feature.

There are 2 approaches to this problem:
* use faster CPU
* make clang-tidy itself faster

>
> Cheers,
>   Steve
>
>>  On 14/02/18 01:33, Steve Atkins wrote:
>>>  I'm using Creator 4.6.0-beta1 on a current generation macbook pro, and 
>>> code completion is painfully slow - it'll take four or five seconds to 
>>> complete anything. While it's doing so clangbackend will ramp up to 200% 
>>> CPU.
>>>  It's a reasonably simple project - less than 6,000 lines of code across 
>>> about 60 files. The completion, and everything else connected to the code 
>>> model seems to be working fine, it's just CPU intensive and slow.
>>>  Is this just how the clang backend is at the moment, or should I be 
>>> looking for misconfiguration or other problems?
>>>  Cheers,
>>>    Steve
>>
>>  ___
>>  Qt-creator mailing list
>>  Qt-creator@qt-project.org
>>  http://lists.qt-project.org/mailman/listinfo/qt-creator
>
> ___
> Qt-creator mailing list
> Qt-creator@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/qt-creator

-- 
Regards,
Konstantin

___
Qt-creator mailing list
Qt-creator@qt-project.org
http://lists.qt-project.org/mailman/listinfo/qt-creator


Re: [Qt-creator] clangbackend slow code completion

2018-02-13 Thread Steve Atkins

> On Feb 13, 2018, at 4:00 PM, Nikos Chantziaras  wrote:
> 
> If you have the "clang-tidy" checks enabled, disable them, or only use 1 or 2 
> of them. That feature is extremely slow.

That fixes it, thanks. Bit of a shame, as they were rather a nice feature.

Cheers,
  Steve

> 
> 
> On 14/02/18 01:33, Steve Atkins wrote:
>> I'm using Creator 4.6.0-beta1 on a current generation macbook pro, and code 
>> completion is painfully slow - it'll take four or five seconds to complete 
>> anything. While it's doing so clangbackend will ramp up to 200% CPU.
>> It's a reasonably simple project - less than 6,000 lines of code across 
>> about 60 files. The completion, and everything else connected to the code 
>> model seems to be working fine, it's just CPU intensive and slow.
>> Is this just how the clang backend is at the moment, or should I be looking 
>> for misconfiguration or other problems?
>> Cheers,
>>   Steve
> 
> 
> ___
> Qt-creator mailing list
> Qt-creator@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/qt-creator

___
Qt-creator mailing list
Qt-creator@qt-project.org
http://lists.qt-project.org/mailman/listinfo/qt-creator


Re: [Qt-creator] clangbackend slow code completion

2018-02-13 Thread Nikos Chantziaras
If you have the "clang-tidy" checks enabled, disable them, or only use 1 
or 2 of them. That feature is extremely slow.



On 14/02/18 01:33, Steve Atkins wrote:

I'm using Creator 4.6.0-beta1 on a current generation macbook pro, and code 
completion is painfully slow - it'll take four or five seconds to complete 
anything. While it's doing so clangbackend will ramp up to 200% CPU.

It's a reasonably simple project - less than 6,000 lines of code across about 
60 files. The completion, and everything else connected to the code model seems 
to be working fine, it's just CPU intensive and slow.

Is this just how the clang backend is at the moment, or should I be looking for 
misconfiguration or other problems?

Cheers,
   Steve




___
Qt-creator mailing list
Qt-creator@qt-project.org
http://lists.qt-project.org/mailman/listinfo/qt-creator