On Saturday 02 February 2002 18:44, Tod Harter wrote: > On Saturday 02 February 2002 09:27, Matt Sergeant wrote: > > On Sat, 2 Feb 2002, Marc-Olivier Bernard wrote: > > > Hi, > > > > > > Is it, in both cases, in memory caching or object persistence ? > > > > In memory. Object persistence wouldn't work. > > I'm not sure "object persistence wouldn't work" but the real question is > would the overhead of serialization/deserialization be any less than the > overhead of parsing the stylesheet each time? I doubt it would be much of a > gain, unless the stylesheet itself is the result of significant processing, > in which case its probably better done in some pre-processing step anyhow.
No, object persistence "could" work but the gains are very incertain. The only efficient way of serialising an XML document (which a stylesheet is) is XML. All attempts thus far to find a better serialisation format have hit a wall which is the fact that XML parsers are very optimized beasts that are hard to beat at what they do. Also, the serialisation of a (possibly optimized after parsing) stylesheet object as returned for instance by XML::LibXSLT is not a trivial task as it isn't a pure Perl object. One place where object persistence "might" be of interest is having those cached stylesheets in shared memory instead of in process memory. I am not sure that this would be a serious gain, unless of course one has many and/or large stylesheets. I'm willing to place this in the TODO if there's serious interest (ie someone that sees this as a real world problem, not just as a cool optimisation that'll save 200 bytes of memory). -- _______________________________________________________________________ Robin Berjon <[EMAIL PROTECTED]> -- CTO k n o w s c a p e : // venture knowledge agency www.knowscape.com ----------------------------------------------------------------------- All fangs and no brain. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
