Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 38881 invoked from network); 2 May 2000 11:10:55 -0000 Received: from bugs.merck.com (HELO mgw2.merck.com) (155.91.6.30) by locus.apache.org with SMTP; 2 May 2000 11:10:55 -0000 Received: from clu2.merck.com ([54.3.194.102]) by mgw2.merck.com (PMDF V5.2-32 #36699) with ESMTP id <01JOWZGQKFSK002OW4@mgw2.merck.com> for cocoon-dev@xml.apache.org; Tue, 2 May 2000 07:10:22 EDT Date: Tue, 02 May 2000 07:09:41 -0400 From: "Williams, Murray Todd" Subject: RE: SAX Event cacheing & Generators To: "'cocoon-dev@xml.apache.org'" Cc: "'robert@webcybernetics.com'" Message-id: <1161B9F1E3E5D111A25700A02461F2AB02B37FB7@usrymx04.merck.com> MIME-version: 1.0 Content-type: text/plain Content-transfer-encoding: 7BIT X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N Actually, I'm rather interested. I've been pondering for quite a while whether there might be a "raw form" of XML storage that would be good to use to "serialize and deserialize" XML data for rapid storage and access in a database. (Read: blob object storage.) I'm not exactly sure how you handle the virtual .vs. static "callback methods". Do you have any sample code snippets handy? Murray Todd Williams > ---------- > From: Rob Parker[SMTP:robert@webcybernetics.com] > Reply To: cocoon-dev@xml.apache.org > Sent: Tuesday, May 02, 2000 6:48 AM > To: cocoon-dev@xml.apache.org > Subject: SAX Event cacheing & Generators > > I've been playing around with cacheing SAX Events. My motivation was to > implement something similar to the FileGenerator - without the overhead > of reading/parsing a file every request. > > Option 1 - cacheing the file contents as a String and parsing the String > at > each request. (Uses memory but removes the file read overhead.) > > Option 2 - parse the file once and build a list of 'pointers to callback > functions' using > the Method class, at each request, just run through the list and call the > invoke method. > (Uses less memory than option 1 and may be faster) > > In my experience, If virtual callback methods are used, option 2 is > slightly slower than option 1. If static > callback methods are used, option 2 is much quicker than option 1. > > If this is of value to any Cocoon developers, then let me know. > > regards > > Rob > >