in reply to Re: Fast shared data structures
in thread Fast shared data structures
So I have used XML::Grove to represent and built my XML trees in the application.
Simple, fast and clean way to do it.
As no suitable XML templating system was available for XML::Grove, I have
written a very simple but powerfull templating system with embeded perl commands.
very fast indeed, because crawling XML::Grove tree is fast operation, no text parsing,
no extensive searches, no overkill-DOM interface overhead.
I pre-parse all the templates on apache start-up and keep that in memory.
Embeded-perl templates are stored as coderefs, indeed.
At a 10000feet my application looks like:
+-------------+ XML +----------------+ HTML/WML/whatever | Application |----->| tmpl processor |-----> +-------------+ +----------------+ ^ | templatesNote that I represent XML trees as perl hashes, not a strings, so any IPC between application and templating modules will make the whole system ineffective.
But if there is no module to share that data (as you indicated) could anyone provide me with any idea how to share a coderef between two processes? I thought that P-code is the same, no matter in what perl interpreter it runs in. I need this only for processes with the same (or very similar) symbol tables - processes forked from the same parent (typical Apache/mod_perl processes).
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: Re: Fast shared data structures
by perrin (Chancellor) on Nov 09, 2001 at 20:14 UTC |