Performance issues with wxBitmap & wxDC under GTK

Do you have a typical platform dependent issue you're battling with ? Ask it here. Make sure you mention your platform, compiler, and wxWidgets version.
Post Reply
dmadhava
Knows some wx things
Knows some wx things
Posts: 25
Joined: Fri May 27, 2005 9:42 pm

Performance issues with wxBitmap & wxDC under GTK

Post by dmadhava » Thu Jul 21, 2005 7:09 pm

Hi,

I am trying to paint an wxImage (approximate size: 400x400) in my OnPaint() handler and the process of creating a Bitmap and painting it is taking like 8-10 seconds! Here is the code snippet:

Code: Select all

    wxBitmap backing(background);
    
    wxPaintDC dc(this);
    dc.BeginDrawing();
    dc.DrawBitmap(background, 0, 0, false);
    dc.EndDrawing();
I am using wxWidget's 2.6.1 under RedHat 9.0 (stock). One issue that could be causing some slowness is that I am running the app over a slow network. But the window pops up really fast etc. (and other stuff like xemacs and all runs fine). Has anybody experienced similar performance bottleneck? Any suggestions or tips to address the performance is greatly appreciated.

thanks

with regards
-DJ

dmadhava
Knows some wx things
Knows some wx things
Posts: 25
Joined: Fri May 27, 2005 9:42 pm

Looks like the network & xServer that influence speed

Post by dmadhava » Thu Jul 21, 2005 10:07 pm

Hello,

In pursuit to try and troubleshoot my problems further, I tried different combinations of XServers and networks, including running directly on the host machine. From my observations it looks like the primary source of the performance bottleneck lies in creation of the bitmap from the image. Namely, the statement:

Code: Select all

wxBitmap backing(background);
is the one that is taking all the time. Now, the question becomes why does it take so much time? My guess is that the speed of communication between the xServer and host seems to be the most critical factor. However, my question then becomes why is it so? Why is GTK's implementation of wxBitmap so demanding on the communication with the XServer? I don't have the background to answer that question. Can somebody else throw some light?

In general I am not sure if you guys are concerend about performance related issues. If you guys are not, I apologize for the noise -- but I am hoping the discussions will be beneficial to someone else.

Post Reply