Re: [Development] [fix]: Assistant (and others) burning CPU because of #f27d1ccbb24ec2fd4098f2976503478831006cc8 ?

2017-09-02 Thread René J . V . Bertin
Coming back startTimer()/killTimer(): I don't think they modify any externally visible class state, do they? If not, would it be possible (and acceptable) to add const versions (or mark them const) so that they can be called from a const member function? I just asked about this on the interest

Re: [Development] [fix]: Assistant (and others) burning CPU because of #f27d1ccbb24ec2fd4098f2976503478831006cc8 ?

2017-09-01 Thread René J . V . Bertin
Eike Ziller wrote: > Another good question to ask when introducing source incompatible changes, is > “how hard does it make supporting building with both Qt 5 and Qt 6 from the > same code base”. We did that for Qt Creator for quite some while, and it makes > the transition process much smoother

Re: [Development] [fix]: Assistant (and others) burning CPU because of #f27d1ccbb24ec2fd4098f2976503478831006cc8 ?

2017-09-01 Thread Eike Ziller
> On 31. Aug 2017, at 16:58, Thiago Macieira wrote: > > On Thursday, 31 August 2017 01:35:08 PDT René J. V. Bertin wrote: >>> Source compatibility. Which is why it's unlikely we'll do it. >> >> Qt6 isn't going to break anything that builds against a sufficiently

Re: [Development] [fix]: Assistant (and others) burning CPU because of #f27d1ccbb24ec2fd4098f2976503478831006cc8 ?

2017-08-31 Thread René J . V . Bertin
Edward Welbourne wrote: Interesting way such as LTTNG/ETW :) ? > >>> Spoiler alert: not on Mac ... > > Konstantin Tokarev (31 August 2017 15:50) >> Mac has DTrace > > Do we have anyone eager to follow up on the LLTNG/ETW work > (see earlier mail in this thread for link), adding DTrace

Re: [Development] [fix]: Assistant (and others) burning CPU because of #f27d1ccbb24ec2fd4098f2976503478831006cc8 ?

2017-08-31 Thread Thiago Macieira
On Thursday, 31 August 2017 01:35:08 PDT René J. V. Bertin wrote: > > Source compatibility. Which is why it's unlikely we'll do it. > > Qt6 isn't going to break anything that builds against a sufficiently recent > Qt5 version? See the other email where I said that this changing this is likely to

Re: [Development] [fix]: Assistant (and others) burning CPU because of #f27d1ccbb24ec2fd4098f2976503478831006cc8 ?

2017-08-31 Thread Edward Welbourne
>>> Interesting way such as LTTNG/ETW :) ? >> Spoiler alert: not on Mac ... Konstantin Tokarev (31 August 2017 15:50) > Mac has DTrace Do we have anyone eager to follow up on the LLTNG/ETW work (see earlier mail in this thread for link), adding DTrace for Mac ? Eddy.

Re: [Development] [fix]: Assistant (and others) burning CPU because of #f27d1ccbb24ec2fd4098f2976503478831006cc8 ?

2017-08-31 Thread Konstantin Tokarev
31.08.2017, 16:48, "René J. V. Bertin" : > Sergio Martins wrote: > >>  Interesting way such as LTTNG/ETW :) ? > > Spoiler alert: not on Mac ... Mac has DTrace > > R. > > ___ > Development mailing list > Development@qt-project.org

Re: [Development] [fix]: Assistant (and others) burning CPU because of #f27d1ccbb24ec2fd4098f2976503478831006cc8 ?

2017-08-31 Thread René J . V . Bertin
Sergio Martins wrote: > Interesting way such as LTTNG/ETW :) ? Spoiler alert: not on Mac ... R. ___ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development

Re: [Development] [fix]: Assistant (and others) burning CPU because of #f27d1ccbb24ec2fd4098f2976503478831006cc8 ?

2017-08-31 Thread Edward Welbourne
Thiago Macieira wrote: >> Source compatibility. Which is why it's unlikely we'll do it. René J. V. Bertin 31 August 2017 10:35 > Qt6 isn't going to break anything that builds against a sufficiently > recent Qt5 version? I doubt that; but the fact that we may break SC at Qt6 doesn't necessarily

Re: [Development] [fix]: Assistant (and others) burning CPU because of #f27d1ccbb24ec2fd4098f2976503478831006cc8 ?

2017-08-31 Thread Sergio Martins
On 2017-08-30 23:13, Thiago Macieira wrote: Ok, so you found by git bisect (or similar) action. I was hoping you had some interesting way of debugging that the problem is timers constantly firing. I woder if GammaRay can give you a list of timers active in a thread and which objects it's

Re: [Development] [fix]: Assistant (and others) burning CPU because of #f27d1ccbb24ec2fd4098f2976503478831006cc8 ?

2017-08-31 Thread René J . V . Bertin
Thiago Macieira wrote: >> I guess so :) I still don't get what purpose calling QObject::timerEvent() >> has if the method itself does nothing. Gives me something to ponder. > > Again, that's what makes QTimer possible. > > void QTimer::timerEvent(QTimerEvent *e) > { > if (e->timerId() ==

Re: [Development] [fix]: Assistant (and others) burning CPU because of #f27d1ccbb24ec2fd4098f2976503478831006cc8 ?

2017-08-31 Thread Volker Krause
On Thursday, 31 August 2017 00:13:43 CEST Thiago Macieira wrote: > On Wednesday, 30 August 2017 14:17:05 PDT René J. V. Bertin wrote: > > Thiago Macieira wrote: > > > > Oops, missed this one. > > > > > Unfortunately, we can't change anymore. > > > > Can someone explain what could possibly be

Re: [Development] [fix]: Assistant (and others) burning CPU because of #f27d1ccbb24ec2fd4098f2976503478831006cc8 ?

2017-08-30 Thread Thiago Macieira
On Wednesday, 30 August 2017 17:17:32 PDT René J. V. Bertin wrote: > Thiago Macieira wrote: > > It makes QTimer possible. > > That sounds quite important to me :-) > > I guess so :) I still don't get what purpose calling QObject::timerEvent() > has if the method itself does nothing. Gives me

Re: [Development] [fix]: Assistant (and others) burning CPU because of #f27d1ccbb24ec2fd4098f2976503478831006cc8 ?

2017-08-30 Thread René J . V . Bertin
Thiago Macieira wrote: > It makes QTimer possible. .. > That sounds quite important to me :-) I guess so :) I still don't get what purpose calling QObject::timerEvent() has if the method itself does nothing. Gives me something to ponder. > function, because it would break the existing code.

Re: [Development] [fix]: Assistant (and others) burning CPU because of #f27d1ccbb24ec2fd4098f2976503478831006cc8 ?

2017-08-30 Thread Thiago Macieira
On Wednesday, 30 August 2017 14:17:05 PDT René J. V. Bertin wrote: > Thiago Macieira wrote: > > Oops, missed this one. > > > Unfortunately, we can't change anymore. > > Can someone explain what could possibly be broken by changing this? Can the > current base-level QObject::timerEvent() be used

Re: [Development] [fix]: Assistant (and others) burning CPU because of #f27d1ccbb24ec2fd4098f2976503478831006cc8 ?

2017-08-30 Thread René J . V . Bertin
Thiago Macieira wrote: Oops, missed this one. > Unfortunately, we can't change anymore. Can someone explain what could possibly be broken by changing this? Can the current base-level QObject::timerEvent() be used for anything constructive other than heating the office or preventing a CPU

Re: [Development] [fix]: Assistant (and others) burning CPU because of #f27d1ccbb24ec2fd4098f2976503478831006cc8 ?

2017-08-30 Thread Thiago Macieira
On Wednesday, 30 August 2017 00:30:05 PDT Olivier Goffart wrote: > We can change the documentation and recommend against using killTimer and > startTimer. QBasicTimer should be used instead. This would have probably > avoided the problem in this case (as one would have called stop instead of >

Re: [Development] [fix]: Assistant (and others) burning CPU because of #f27d1ccbb24ec2fd4098f2976503478831006cc8 ?

2017-08-30 Thread Jean-Michaël Celerier
> Today, that QObject::schedule is achieved by (ab)using QTimer::singleShot(0, func). There have been interesting discussions on StackOverflow about this : https://stackoverflow.com/questions/21646467/how-to-execute-a-functor-or-a-lambda-in-a-given-thread-in-qt-gcd-style

Re: [Development] [fix]: Assistant (and others) burning CPU because of #f27d1ccbb24ec2fd4098f2976503478831006cc8 ?

2017-08-30 Thread Giuseppe D'Angelo
Il 30/08/2017 11:28, Morten Sørvig ha scritto: There is also the option of creating new API that better covers the use case of running a pice of code once when control returns to the event loop. In use this could look something like this: QCocoaMenu::scheduleUpdate() { if

Re: [Development] [fix]: Assistant (and others) burning CPU because of #f27d1ccbb24ec2fd4098f2976503478831006cc8 ?

2017-08-30 Thread Morten Sørvig
> On 30 Aug 2017, at 09:30, Olivier Goffart wrote: > > Am Dienstag, 29. August 2017, 17:30:56 CEST schrieb Thiago Macieira: >> On Tuesday, 29 August 2017 01:10:53 PDT René J.V. Bertin wrote: >>> Which we just rediscovered :) Funny though, apparently 1 misdirected >>>

Re: [Development] [fix]: Assistant (and others) burning CPU because of #f27d1ccbb24ec2fd4098f2976503478831006cc8 ?

2017-08-30 Thread Philippe
Maybe even deprecate startTimer and killTimer? -1 I like this low level insight, which gives me a higher sense of control about what's going on. Philippe On Wed, 30 Aug 2017 08:06:35 + Lars Knoll wrote: >> On 30 Aug 2017, at 09:30, Olivier Goffart

Re: [Development] [fix]: Assistant (and others) burning CPU because of #f27d1ccbb24ec2fd4098f2976503478831006cc8 ?

2017-08-30 Thread Lars Knoll
On 30 Aug 2017, at 09:30, Olivier Goffart > wrote: Am Dienstag, 29. August 2017, 17:30:56 CEST schrieb Thiago Macieira: On Tuesday, 29 August 2017 01:10:53 PDT René J.V. Bertin wrote: Which we just rediscovered :) Funny though, apparently 1

Re: [Development] [fix]: Assistant (and others) burning CPU because of #f27d1ccbb24ec2fd4098f2976503478831006cc8 ?

2017-08-30 Thread Olivier Goffart
Am Dienstag, 29. August 2017, 17:30:56 CEST schrieb Thiago Macieira: > On Tuesday, 29 August 2017 01:10:53 PDT René J.V. Bertin wrote: > > Which we just rediscovered :) Funny though, apparently 1 misdirected > > startTimer() call can turn any application in a CPU hog that burns cycles > > without

Re: [Development] [fix]: Assistant (and others) burning CPU because of #f27d1ccbb24ec2fd4098f2976503478831006cc8 ?

2017-08-29 Thread Thiago Macieira
On Tuesday, 29 August 2017 01:10:53 PDT René J.V. Bertin wrote: > Which we just rediscovered :) Funny though, apparently 1 misdirected > startTimer() call can turn any application in a CPU hog that burns cycles > without ever doing anything. Wouldn't it be safer for QObject::timerEvent() > to kill

Re: [Development] [fix]: Assistant (and others) burning CPU because of #f27d1ccbb24ec2fd4098f2976503478831006cc8 ?

2017-08-29 Thread René J . V . Bertin
On Tuesday August 29 2017 02:02:59 Gabriel de Dietrich wrote: >FYI: QCocoaMenu: Stop update timer >(Merged) Thanks for the heads-up. > >On Aug 29, 2017, at 9:00 AM, Thiago Macieira >> wrote: >

Re: [Development] [fix]: Assistant (and others) burning CPU because of #f27d1ccbb24ec2fd4098f2976503478831006cc8 ?

2017-08-28 Thread Gabriel de Dietrich
FYI: QCocoaMenu: Stop update timer (Merged) Best regards, Dr. Gabriel de Dietrich Senior Software Developer The Qt Company On Aug 29, 2017, at 9:00 AM, Thiago Macieira > wrote: On Monday, 28

Re: [Development] [fix]: Assistant (and others) burning CPU because of #f27d1ccbb24ec2fd4098f2976503478831006cc8 ?

2017-08-28 Thread Thiago Macieira
On Monday, 28 August 2017 17:06:18 PDT René J.V. Bertin wrote: > killTimer(m_updateTimer); > > before setting m_updateTimer=0? Whether or not it's appropriate, this does > solve the CPU burning for me. Yeah, if you don't kill the timer, it will keep firing. -- Thiago Macieira -

Re: [Development] [fix]: Assistant (and others) burning CPU because of #f27d1ccbb24ec2fd4098f2976503478831006cc8 ?

2017-08-28 Thread René J . V . Bertin
On Monday August 28 2017 23:10:22 René J.V. Bertin wrote: I found a potential fix: shouldn't QCocoaMenu::timerEvent() call killTimer(m_updateTimer); before setting m_updateTimer=0? Whether or not it's appropriate, this does solve the CPU burning for me. R. > Hi, > > I noticed an