Hi,

Re: change which caused the CPU burning issue I discovered a couple of days 
back ("[fix]: Assistant (and others) burning CPU because of 
#f27d1ccbb24ec2fd4098f2976503478831006cc8 ?"). It intrigued me why an 
application that doesn't use native Mac menus would be calling [NSMenu update] 
at all. 

I now know that the menu which triggered the scheduled NSMenu update is one 
that is attached to a button but that is also installed as the Dock menu. I 
guess that explains why its QMenu items have corresponding QCocoaMenu items.

If [NSMenu update] is expensive enough that it was put on a timer, is it 
certain that it's only being called when required, i.e. only for menus attached 
to the native menubar or possibly the application's dock tile? I haven't seen 
it being called in other cases like context menus and menus that are part of a 
non-native menubar, do those even (need to) get a QCocoaMenu instance 
associated with them?

R.

On Tuesday August 29 2017 02:02:59 Gabriel de Dietrich wrote:
> FYI: QCocoaMenu: Stop update timer 
> (Merged)<https://codereview.qt-project.org/203791>
> 
> Best regards,
> 
> Dr. Gabriel de Dietrich
> Senior Software Developer
> The Qt Company
> 
> On Aug 29, 2017, at 9:00 AM, Thiago Macieira 
> <[email protected]<mailto:[email protected]>> wrote:
> 
> 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 - thiago.macieira (AT) intel.com<http://intel.com>
>  Software Architect - Intel Open Source Technology Center
> 
> _______________________________________________
> Development mailing list
> [email protected]<mailto:[email protected]>
> http://lists.qt-project.org/mailman/listinfo/development
> 
_______________________________________________
Development mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/development

Reply via email to