Guidance
指路人
g.yi.org
Guidance Forums / wxWidgets (wxWindows) in C++ / XPM Performance Hit

Register 
注册
Search 搜索
首页 
Home Home
Software
Upload

  
Forum List • Thread List • Reply • Refresh • New Topic • Search • Previous • Next First 1 Last
Message1. XPM Performance Hit
#5018
Posted by: 2004-08-25 13:13:37
Hi,

I am currently deciding how I want to ship the graphics with my application.  The only two viable options (in my case) I've decided on are to either load them directly from disk, or to go with embedding them using XPM techniques I've seen upCASE and others post on this board.  I can get both to work, but I am incurring a slight perforamnce hit using the XPM method.

Embedding the XPM does not cause the hit, but rather after I instantiate an object with the line:
wxBitmap* testImg = new wxBitmap(test_xpm);

It is then that my application takes an additional 2 sec to appear on screen.  My test.xpm is approximately 600 KB.  What worries me, is I have atleast two or three other graphics of this (or larger) size, and don't want my application to hang for 30 seconds on startup. 

I experience no delay when I load graphics directly from disk, but am not really comfortable with my images being readily available in an images directory.

As an aside, I have experimented with XRC (no luck) and RC files (no GIF support), and found them to be lacking.

Can anyone provide a workaround to solve this delay, or any insight?

Thanks,

-Tyler

Message2. Re: XPM Performance Hit
#5036
Posted by: 2004-08-31 13:04:55
Nevermind.  I re-did everything with embedded XRC with the wxWindows 2.5.1 and it works perfectly.  I can embed gifs, or jpegs, the compression is awesome, and there's no performance hit.

I would definitely recommend anyone persuing embedding large graphics into their app to go with embedded XRC.
Forum List • Thread List • Reply • Refresh • New Topic • Search • Previous • Next First 1 Last
掌柜推荐
 
 
¥860.00 ·
 
 
¥900.00 ·
 
 
¥810.00 ·
 
 
¥317.00 ·
 
 
¥1,370.00 ·
 
 
¥660.00 ·
© Sun 2024-11-24  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0