Navigation Menu
loading content ...
Error Message
Macro 'toolbar' not defined, or not allowed to call [restricted_mode=False]
Rated /5.00 | Created 16 January 2009
Not so long ago I mentioned about experimenting with speeding up the experience in GeoTiddlyWiki for internet explorer users. The proposal was to throw away Google's ExplorerCanvas and to create the vml objects myself and treat scaling and translating transformations differently to ExplorerCanvas. So to recap ExplorerCanvas allows you to do everything in canvas which you can in Firefox, however fatally this means that it replicates the way canvas performs transformations - it applies them first and then every drawing command that follows implements that transformation

So for example in canvas say you had a drawing of a line from coordinate 0,0 to 100,100 and then wanted to scale this line to make it twice as big you'd do the following.
ctx.clear(); //clear existing drawing
ctx.scale(2,2); //set new scale

//drawing same drawing in this new context
ctx.beginPath();
ctx.moveTo(0,0);
ctx.lineTo(100,100);
ctx.closePath();

You try to do the same thing in ExplorerCanvas and it may not be noticeable on one line but I promise you the more lines there are the more noticeable that is going to get.
The reason is that ctx.clear() method. With that call, every single vml object is going to disappear. Then with every closePath command a new vml object will appear. Creating dom elements and destroying them are not good ideas in Internet Explorer.

So focusing on what vml is, it becomes clear that if you want to do some translations and scaling you should re-use existing vml objects instead of deleting ones and creating new ones. Sure it's still going to load slow that first time, but every time from then on it should be much quicker to draw. You can either directly modify the path attribute of the vml object or even better using css modify the left, top, width and height attributes. Still haven't worked out the best way for rotation but it certainly makes a difference in apps just using translation and scaling.

I guess the proof is in the pudding so try either this link or take a look at my Travel tiddler and try the panning and zooming in Internet Explorer, and although it's still not quite the same experience as Firefox it's a lot better than you might expect.

Thanks for reading this far. Did I bore you or interest you? Let me get better at doing the latter and focus more on working on the good stuff...
Error Message
Macro 'ratemytiddler' not defined, or not allowed to call [restricted_mode=False]
Comments
Error Message
Macro 'tiddlyWebComments' not defined, or not allowed to call [restricted_mode=False]
a list of older blog posts can be found at here

Please ignore the following if you are using a text browser (this is part of the TiddlyWiki application used to run this software):