Performance analysis
Gwenole Beauchesne
gb.public at free.fr
Sun Nov 23 23:41:21 UTC 2008
Hi,
After 1.2.0 is released, I would like to implement some ideas that
should improve performance (reduce RPC trafic and timers). But how
could this be evaluated in the first place?
Since I never really carried out performance analysis and people
expressed concerns with nspluginwrapper performance, here is my
initial attempt. The idea is to collect websites that make (intensive)
use of Flash. e.g. the following websites could be interesting:
- 4 Flash areas:
<http://www.tf1.fr/> :
- 2 Flash areas, including one with some constant animation that could
trigger NPN_InvalidateRect() in windowless mode for example:
<http://www.koreus.com/jeu/bloxorz.html>
- 1 Flash video that is auto-playing for a couple of minutes:
<http://www.theonion.com/content/video/economists_warn_anti_bush>
Then, after a certain amount of time (e.g. 2 minutes), we check how
much CPU both the viewer and the browser are using (ps with %CPU). I
am not sure the latter is a reliable indicator though.
I have attached a small script I ran for several hours along with
initial results for both windowed and windowless modes. Note: the
script was quick-and-dirty code, better run it on a spare machine, if
you really want to test it. For example, I use sudo rm and sudo cp
because opera requires the plugins to lay in specific directories.
Yes, I also wanted to compare with Opera. ;-) BTW, if you know how to
make Opera accept plugins from a user directory, please tell (thus
avoiding sudo...). Thanks.
The results are strange because I didn't expect nspluginwrapper
overhead < 5% in windowless mode too. I know there are numerous
NPP_HandleEvent() and NPN_InvalidateRect() calls normally. And, I
actually got a case where npviewer.bin was taking up to 50% more CPU
than in windowed case. So, there may be room to improve the benchmark
process. ;-)
Hmm, now that I remember, the manual testing was done with a Firefox
3.1 beta and the automated testing was done with Firefox 3.0.3 from
openSUSE 11.0 updates. So, Firefox 3.1b was probably causing the
excessive amount of events to pass through RPC. I will have to check
another day.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bench-browsers.sh
Type: application/octet-stream
Size: 6468 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/nspluginwrapper-devel-list/attachments/20081124/15639046/attachment.obj>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: bench-browsers.txt
URL: <http://listman.redhat.com/archives/nspluginwrapper-devel-list/attachments/20081124/15639046/attachment.txt>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: bench-browsers.windowless.txt
URL: <http://listman.redhat.com/archives/nspluginwrapper-devel-list/attachments/20081124/15639046/attachment-0001.txt>
More information about the Nspluginwrapper-devel-list
mailing list