View unanswered posts | View active topics It is currently Fri Jan 17, 2020 11:44 pm

Reply to topic  [ 2 posts ] 
 VML Cache? 
Author Message

Joined: Thu Jul 15, 2010 1:56 pm
Posts: 34
Post VML Cache?
Is there a way to cache the VML generated by PIE? So that they don't have to be re-drawn from scratch every time? It's probably a pipe dream, but I wondered if anyone had thought about sending generated docs back to a server cache or anything like that.

Mon Jan 24, 2011 6:47 pm

Joined: Wed Jul 14, 2010 11:46 am
Posts: 1452
Post Re: VML Cache?
It's a good thought, and something I've seriously considered as a performance optimization. Unfortunately, in order for this approach to be at all worthwhile, you have to know all the dimensions of your target elements up-front, because the VML paths (and other properties like background position and clipping, gradient lengths and angles, etc.) depend very much on the width and height of the element at render time. And unfortunately it's very rare where an application will know the element dimensions before the page is rendered, so a server-side cache would rarely be useful.

That said, there are plenty of PIE's internals that are cached at runtime, for instance a given CSS property value string will only be parsed into an object representation once. There are undoubtedly other pieces that can be looked at for potential internal caching, though you have to be really careful and do lots of profiling to make sure maintaining such caches don't take more processing than their original calculations.

I welcome thoughts and advice on these things. :)

Mon Jan 24, 2011 7:03 pm
Display posts from previous:  Sort by  
Reply to topic   [ 2 posts ] 

Who is online

Users browsing this forum: No registered users and 0 guests

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.