[Gambas-user] Draw.Begin/End execution time

Benoît Minisini gambas at ...1...
Sat Jun 9 22:17:37 CEST 2012


Le 09/06/2012 21:05, Adrien Prokopowicz a écrit :
> Le samedi 9 juin 2012 20:45:49 Benoît Minisini a écrit :
>> Le 09/06/2012 19:41, Adrien Prokopowicz a écrit :
>>> Hi all,
>>>
>>> in my project I have a cached DrawArea that I need to redraw each time it
>>> is resized. My code is like this :
>>>
>>> Public Sub RefershDrawArea()
>>>
>>>     Draw.Begin($drawArea)
>>>
>>>     'Drawing methods here ...
>>>
>>>     Draw.End
>>>
>>> End
>>>
>>> That works perfectly, but when I launch the profiler, he tells me that the
>>> Draw.Begin() method takes a lot of time (around 20 ms).
>>>
>>> Is there a way to make this call faster ? Or maybe a way to do only one
>>> call to Begin() when the user starts resizing and to End() when it stops
>>> ?
>>>
>>> Regards,
>>> Adrien.
>>
>> Please provide a project that shows that!
>
> Here is a little test project.
>
> And I just noticed that there isn't this problem with gb.gtk. So for me it's a
> bug in gb.qt4.
>

On my machine, Draw.Begin with gb.gtk takes about 120 micro-seconds the 
first time it is called, 50 us the next times. With gb.qt4, it takes 
about 300 us each time.

So I don't understand how it could take 20 ms on your machine: it means 
that my PC is 66x faster than yours!

-- 
Benoît Minisini




More information about the User mailing list