ScopeGenerator recalculates MD5 every request

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

ScopeGenerator recalculates MD5 every request

Adrian Baker-3
The ScopeGenerator is used when passing a complete XHTML+XForms document to Orbeon for display (see xforms-renderer.xpl).

I've found the most efficient way to pass in documents is using a SAXStore, since this avoids slow conversion from other types like DOM, byte stream etc.

However even using SAXStore, the MD5 digest is re-calculated on every request, which is expensive for a large document - wastefully so, since generally the same documents/forms are being passed in again and again. If it's not possible to cache the calculation result within Orboen (perhaps difficult without replaying the entire SAXStore), could the ScopeGenerator be extended so that a SAXStore+MD5 can be passed in (we cache the SAXStore in our application)?

Adrian
Reply | Threaded
Open this post in threaded view
|

Re: ScopeGenerator recalculates MD5 every request

Alessandro Vernet
Administrator
Adrian,

On Oct 22, 2008, at 2:17 PM, Adrian Baker wrote:

> However even using SAXStore, the MD5 digest is re-calculated on every
> request, which is expensive for a large document - wastefully so,  
> since
> generally the same documents/forms are being passed in again and  
> again. If
> it's not possible to cache the calculation result within Orboen  
> (perhaps
> difficult without replaying the entire SAXStore), could the  
> ScopeGenerator
> be extended so that a SAXStore+MD5 can be passed in (we cache the  
> SAXStore
> in our application)?

Yes, it could. I guess you could add the digest to the SAXStore. This  
information would be optional and used by the ScopeGenerator if  
present. Is this something that you were thinking of implementing?

Alex
--
Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
Orbeon's Blog: http://www.orbeon.com/blog/
Personal Blog: http://avernet.blogspot.com/
Twitter - http://twitter.com/avernet



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: ScopeGenerator recalculates MD5 every request

Adrian Baker-3
Alessandro Vernet wrote
Adrian,

On Oct 22, 2008, at 2:17 PM, Adrian Baker wrote:

> However even using SAXStore, the MD5 digest is re-calculated on every
> request, which is expensive for a large document - wastefully so,  
> since
> generally the same documents/forms are being passed in again and  
> again. If
> it's not possible to cache the calculation result within Orboen  
> (perhaps
> difficult without replaying the entire SAXStore), could the  
> ScopeGenerator
> be extended so that a SAXStore+MD5 can be passed in (we cache the  
> SAXStore
> in our application)?


Yes, it could. I guess you could add the digest to the SAXStore. This  
information would be optional and used by the ScopeGenerator if  
present. Is this something that you were thinking of implementing?

Alex
Actually I did go ahead an implement a tweaked version of the ScopeGenerator to allow an extended version of SaxStore to be passed in with a precalculated MD5. I didn't see any measureable performance gain though, I think the profiler overstated the MD5 calculation cost.
Reply | Threaded
Open this post in threaded view
|

Re: Re: ScopeGenerator recalculates MD5 every request

Alessandro Vernet
Administrator
Adrian,

On Feb 18, 2009, at 4:35 PM, Adrian Baker wrote:
> Actually I did go ahead an implement a tweaked version of the  
> ScopeGenerator
> to allow an extended version of SaxStore to be passed in with a
> precalculated MD5. I didn't see any measureable performance gain  
> though, I
> think the profiler overstated the MD5 calculation cost.

We've seen our fair share of profiler overstating this or that part of  
the code, and it is annoying when it happens, but I guess part of the  
profiling exercise! Then I guess it isn't worth making the code more  
complicated with this. Thanks for the update.

Alex
--
Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
Orbeon's Blog: http://www.orbeon.com/blog/
Personal Blog: http://avernet.blogspot.com/
Twitter - http://twitter.com/avernet



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws