dc.drawBitmap slow

Hi list,
I'm trying a my application on win and on lin and I see, with a big
surprise, that there are a big speed difference when I draw a bitmap on
a dc (a panel dc) and those platforms, after set the dc userscale:

bitmap: size = 1700x2200, depth = 24

time in seconds calculate with this:
t = time.time()
dc.DrawBitmap(bmp, 0,0)
print time.time() -t

scale win lin
1.0 0.01 0.001
0.9 0.06 4.1
0.8 0.05 2.5
0.6 0.05 1.7
0.5 0.06 1.3
0.1 0.04 0.7

Is there a solution or at least an answer *why* this very high time on lin?

win 2k, py 2.3, 2.6.1
deb 3.1, py 2.3, wx 2.6.1 (self compiled)

Thanks,
Michele

The scaling code on Linux is probably using a generic code path which
convert the bitmap to a wxImage, scales it, and back to a wxBitmap.
This is slow. There is work being done on improving the performance of
wxDC on Gtk which may help this, but I can't give you any timeline on
when you might see it.

Consider pre-scaling images and caching as neccesary.

ยทยทยท

On 11/11/05, Michele Petrazzo <michele.petrazzo@unipex.it> wrote:

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org

Chris Mellon wrote:

The scaling code on Linux is probably using a generic code path which
convert the bitmap to a wxImage, scales it, and back to a wxBitmap.
This is slow. There is work being done on improving the performance of wxDC on Gtk which may help this, but I can't give you any timeline
on when you might see it.

So on win, there is another (better) solution? I'm curious :slight_smile:

Consider pre-scaling images and caching as neccesary.

Done.

Thanks,
Michele