Sample04_Translucency : severe perf. issue without WS_POPUP

DLL Edition of the F-IN-BOX
denster
Posts: 4
Joined: Fri Dec 07, 2007 3:04 am

Sample04_Translucency : severe perf. issue without WS_POPUP

Postby denster » Fri Dec 07, 2007 4:02 am

Hi,

Thanks for a great control. We were getting ready to purchase the full version (with source) this week, but I ran into a major performance issue today.

The steps to reproduce it are:

1) Build a SWF that allows you to move around a "Flex window" / sprite around the screen. (Using the mx:Panel element.)

I have attached a sample f_in_box.swf that can be used to demonstrate the performance problem.

2) Modify your Sample04_Translucency.cpp as follows:

- Pass 0,0,1600,1200 as the window size values to CreateWindowEx

- Remove the line that centers the window, namely: //pFlashProjectorWnd->CenterWindow();

- Remove call to FPCLoadMovieFromResource

- Instead, add call to FPC_LoadMovie(hwndFlashPlayerControl,0,_T("path\to\your\f_in_box.swf"));

3) Launch the example. Try to drag the "Flex window" around the screen. The dragging is very slow and jagged, because a great deal of CPU time is spent doing something else.

(I suspect handling erronous WM_PAINT messages, but I'm uncertain, since I don't have the source to f_in_box yet.)

As a result, the performance of the resulting SWF is unacceptable. It becomes difficult to type characters, move the window around, or do anything else.

At this point, I assumed that perhaps this was just a limitation of WS_EX_LAYERED.

However, Adobe AIR does not suffer from this performance limitation when running the same SWF. A win32 API trace utility revelaed a glaring difference:

When Adobe AIR calls CreateWindowEx(....), it does *not* use the WS_POPUP style. In fact, it uses:

WS_EX_LAYERED,

WS_OVERLAPPED
WS_CLIPCHILDREN
WS_SYSMENU
WS_THICKFRAME
WS_MINIMIZEBOX
WS_MAXIMIZEBOX
WS_GROUP
WS_TABSTOP


4) Interestingly enough, if you remove the WS_POPUP style from Sample04_Translucency.cpp, everything works fine! The performance is great (even better than Adobe AIR), and the window can be dragged

around, text typed quickly, etc.

However, when I remove WS_POPUP from Sample04_Translucency.cpp, I run into another problem. The painting of the hWnd hosting the flash control gets messed up very quickly. In the sample I've provided, try typing text into the lower text field. You'll notice that the damaged areas of the win32 window fail to repaint themselves.

My guess is, as soon as damaged regions of the window arrive, the window fails to repaint it with content from the sWF.

Here's my question:

How can we get the performance that currently occurs without WS_POPUP, and yet have correct painting behavior?

If this problem is resolved, I can get my manager to buy a full (with source) license (or perhaps even a site license for future devs maintaining our app).

Alternately, feel free to email me a copy of the source, and I can try to find a fix, and send you guys a copy if I'm able to create a fix.

Additionally, I speak and read Russian fluently, so if it's easier to respond in Russian, please feel free to do so. (I just can't write very well -- it would be embarrassing if I tried.)

Also, please advise of a timeline as to when this issue can be resolved, so that I can give my manager an update.

Thanks for all your help!
denster201 [remove-thisthing-]-at-yahoo.com

denster
Posts: 4
Joined: Fri Dec 07, 2007 3:04 am

The SWF mentioned in the above post

Postby denster » Fri Dec 07, 2007 4:04 am

Hi,

I've posted the SWF that can be used to reproduce the issue here:

http://rapidshare.de/files/37991567/f_in_box.swf.html

Thanks,
denster

Softanics
Site Admin
Posts: 1402
Joined: Sat Sep 18, 2004 3:03 am
Location: Russia, St. Petersburg
Contact:

Postby Softanics » Fri Dec 07, 2007 11:40 am

Thank you!

Yes, I've reproduced the behavior.

Could you please upload the AIR application too?
Best regards, Artem A. Razin,
F-IN-BOX support
Ask your question here: http://www.f-in-box.com/support.html

denster
Posts: 4
Joined: Fri Dec 07, 2007 3:04 am

AIR download link & installer

Postby denster » Sat Dec 08, 2007 12:46 am

Hi,

Thanks for the fast turnaround!

You can grab a copy of the Adobe AIR runtime from:

http://labs.adobe.com/downloads/air.html

Once Adobe AIR is installed, please grab the air app I've created from:

http://rapidshare.de/files/37998452/f_i ... r.air.html

This air app has code identical to the f_in_box.swf I attached previously.

Let me know if there's anything else I can provide.

Thanks!
denster

Softanics
Site Admin
Posts: 1402
Joined: Sat Sep 18, 2004 3:03 am
Location: Russia, St. Petersburg
Contact:

Postby Softanics » Sat Dec 08, 2007 2:49 pm

Thank you very much!

I've answered to the ticket system. Please check it.
Best regards, Artem A. Razin,

F-IN-BOX support

Ask your question here: http://www.f-in-box.com/support.html

denster
Posts: 4
Joined: Fri Dec 07, 2007 3:04 am

Performance Much Better

Postby denster » Wed Dec 12, 2007 1:00 am

Hi,

Thank you so much!!! The performance in the new build is definitely much better.

I think Russian programmers are the best, but then again, maybe I'm a little biased ;-)

Anyway, thank you for making this fix!

(As a result, we've purchased a copy of the f-in-box DLL with source, and I'll be contacting you guys from our purchase email address to get an updated copy of the source as well.)

Thanks!
denster


Return to “DLL Edition”

Who is online

Users browsing this forum: No registered users and 17 guests

cron