Google Explorercanvas (excanvas) for IE. Silverlight vs VML

by Guido Tapia

in software-engineering,

March 15, 2010

Many people do not realise that excanvas has a silverlight implementation. This implementation is apparently less stable (I have had very few issues with it) but much much faster. The only real draw back as I see it is that it requires clients to have silverlight installed (stat owl has this penetration rate at about 40%).

I use excanvas (silverlight) to allow support IE users to use the Mouse Eye Tracking Service. Now this is a highly graphical intensive application so the demands I put on my canvas tag are huge. The standard excanvas (VML) implementation just did not cut it at all however the silverlight version has allowed me to support IE.

The purpose of this article is to more intelligently compare the performance of both ex canvases. I have used slightly modified versions of the excanvas test cases for performance measures. You can download all the tests here.

All tests were run in IE8 on a poor spec Win XP box. This may be quite a limited but it suffices to give us a comparison between VML excanvas and silverlight excanvas. The tests measure the time taken to do 200 iterations of the mentioned test. Please see the source code of the tests for more details.

Note: I am using the dev versions of excanvas from here.

TestVML (ms)Silverlight (ms)x times faster
Arc12505622.22
Clearpath11092813.95
Colors914119064.8
DrawImage315623413.49
DrawImageFlip128812n/an/a
Gradient8284062.04
Gradient213594223.22
LineWidth3786691895319.98
Overflow685934419.94
Overlay2703n/an/a
Pattern3140n/an/a
QuadraticCurve5032n/an/a
Resizingn/an/an/a
Restorepath2484n/an/a
StrokeScaleAndRotate7860n/an/a
StrokeShouldNotClosePath4766n/an/a
Text6844n/an/a

Conclusions

We can see that the silverlight excanvas has very limited support for many features. However the features it does support are many multiples faster (2 - 20 times faster). So if you are not using the advanced features, use silverlight.

Thanks

Guido Tapia Software Development Manager PicNet Pty Ltd