kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #23004
Re: [PATCH] No GAL FPS Limiting for OS X
I see it on both of my machines with 10.10 and 10.11.
It is probably not so obvious with the current way of panning.
With the touchpad panning patch/function (what also many OS X users would like to have) I’ll post these days it is very obvious.
Those who tested preliminary versions of this patch also confirmed that it is much smoother without the timer.
> On 08 Feb 2016, at 17:25, Wayne Stambaugh <stambaughw@xxxxxxxxx> wrote:
>
> I'm surprised other osx users have not complained about this before now.
> Is it possible that this is due a particular version of wxWidgets
> and/or osx and only Bernhard is seeing this?
>
> On 2/8/2016 9:34 AM, Maciej Sumiński wrote:
>> Redrawing has to be done with every mouse movement (at least to redraw
>> the cursor), so to avoid issuing too frequent paint events, the timer
>> limits the number of requests per second.
>>
>> I cannot really tell why there is such discrepancy in wxTimer behavior
>> depending on the platform. Was this the case since the beginning? If
>> not, was it introduced in a particular wxWidgets or OS X version?
>>
>> Regards,
>> ORson
>>
>> On 02/08/2016 03:08 PM, Wayne Stambaugh wrote:
>>> I wonder if the throttling is done by wxWidgets, do we even need to
>>> throttle on windows and linux? Would one of our gal devs please comment
>>> on why this is necessary? Is this patch good to go on OSX?
>>>
>>> On 2/6/2016 10:25 AM, Bernhard Stegmaier wrote:
>>>> Hi,
>>>>
>>>> attached a patch to disable the below mentioned FPS limitation on OS X.
>>>>
>>>> Without limitation/timer scrolling is smooth as expected.
>>>> Even with heaviest scrolling or other use-cases I tested I did not
>>>> observe any increased CPU load.
>>>>
>>>> At least, from a user perspective possibly drawing too often seems way
>>>> better than having nasty hangs due to the excessive timer latency.
>>>>
>>>>
>>>> Regards,
>>>> Bernhard
>>>>
>>>>
>>>>
>>>>
>>>>> On 31.01.2016, at 16:45, Bernhard Stegmaier <stegmaier@xxxxxxxxxxxxx
>>>>> <mailto:stegmaier@xxxxxxxxxxxxx>> wrote:
>>>>>
>>>>> Hi all,
>>>>>
>>>>> I was looking why panning in GAL canvas on OS X is sometimes very jerky.
>>>>>
>>>>> I found out that GAL implements a framerate limiting using a timer,
>>>>> which blocks further updates if you try to refresh with >60Hz.
>>>>> With a Mac touchpad you easily get scroll events >60Hz, so that hits
>>>>> quite often.
>>>>>
>>>>> Problem is, that the timer event to unblock again at least on my
>>>>> MacBook often needs between 200ms and 500ms instead of the max. 17ms
>>>>> it should have. If this happens, you get “hangs” while panning.
>>>>>
>>>>> I tried to throttle mouse events to <60Hz to avoid hitting the timer.
>>>>> Unfortunately, this doesn’t seem to be enough, because
>>>>> EDA_DRAW_PANEL_GAL::Refresh still seems to be called very frequently
>>>>> (<<17ms, often with a delta of 0ms or 1ms). So, timer still kicks in
>>>>> and blocks things more than needed.
>>>>> I also did notice that EDA_DRAW_PANEL_GAL::Refresh is called on every
>>>>> mouse move (with default system mouse cursor)… is that also intended?
>>>>> For updating status bar?
>>>>>
>>>>> Any ideas on either how to improve the timer or how not to make it
>>>>> kick in?
>>>>>
>>>>> I already did try to use the wxTimer::Notify() function instead of
>>>>> having a wxTimerEvent delivered, but that didn’t make any big difference.
>>>>> I didn’t investigate the timer implementation of wxWidgets on OS X,
>>>>> maybe the latency already is there before any wxWidget event handling.
>>>>>
>>>>> Or, wouldn’t it be more appropriate to use something like the vertical
>>>>> sync
>>>>> https://www.opengl.org/wiki/Swap_Interval
>>>>> to limit drawing instead of this timer?
>>>>>
>>>>>
>>>>> Regards,
>>>>> Bernhard
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Mailing list: https://launchpad.net/~kicad-developers
>>>>> Post to : kicad-developers@xxxxxxxxxxxxxxxxxxx
>>>>> <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>
>>>>> Unsubscribe : https://launchpad.net/~kicad-developers
>>>>> More help : https://help.launchpad.net/ListHelp
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> Mailing list: https://launchpad.net/~kicad-developers
>>>> Post to : kicad-developers@xxxxxxxxxxxxxxxxxxx
>>>> Unsubscribe : https://launchpad.net/~kicad-developers
>>>> More help : https://help.launchpad.net/ListHelp
>>>>
>>>
>>> _______________________________________________
>>> Mailing list: https://launchpad.net/~kicad-developers
>>> Post to : kicad-developers@xxxxxxxxxxxxxxxxxxx
>>> Unsubscribe : https://launchpad.net/~kicad-developers
>>> More help : https://help.launchpad.net/ListHelp
>>>
>>
>>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help : https://help.launchpad.net/ListHelp
References