good chemistry is complicated,
and a little bit messy -LW
An Epiphonyby Logicus
|on Jul 31, 2011 at 22:43 UTC||Need Help??|
This posting has been designated as off-topic for the PerlMonks web site. Please do not respond to it.
I've had an epiphony.
I am one lazy son of a b****, and I've been relying on the sheer amount of processing power available and some dodgy excuses about a particular problem to avoid doing what I ought to be doing with aXML.
And no, I don't mean scrapping it...
Right, heres what I'm going to do, (well what I've already started doing tbh),
First off, aXML cannot encode anything which is not also encodable with standard XML, using extra verbosity. Well that is not entirely true but it's nearly true, I can think of a particular case of valid aXML which cannot be encoded in XML, but for the purposes of making aXML work with the stone-age classical computers we are still working with I'm going to just let that one slide... for now.
I'm reminded of the days when we used to draw polygons line by line, using word writes instead of single bytes because it doubled the rendering speed, calculating the shading values using fixed point maths to avoid using floats which were too slow... moores law eventually gave us the ability to draw millions of polygons with 64bit accuracy, and it will eventually deliver processors which will run the the full standard of aXML rather than the slightly cut down version aXML2 will be using.
But I digress...
Basically I'm planning on writing a compiler which takes aXML files, translates them to XML, slurps that XML up using something like XML::Simple, then dumps the structure out into a code generated module file, thus saving that step next time. Couple that with a system which takes the simple module logic and also writes out a perl module wrapper, and then the actions and the plugins will all be compiled leaving only the small overhead of processing the saved structure at runtime.
Combined with ModPerl::Registry, and using non-OO, code for instance my QD module (which is about 2x faster than CGI ->param as it stands) and aXML2 is going to be fasssst.
How fast I don't know yet, but I'm hoping to have a working version available quite soon. (I'm a devil of a coder when I have an idea I'm excited about).
It's just a shame there is no way to compile this (the special case):
Or maybe there is, but I can't think of one!