Forum OpenACS Development: Re: Invalid XML in XQL files

Posted by John Sequeira on
I would like to propose an alternative to the megafile.  I know there's a python script somewhere that takes SQL out of the tcl files and into the XQL files.  I've prototyped a script that does the reverse - takes queries out of the XQL files and inlines them into the TCL script.  It then deletes/renames the XQL files so that they're not found and parsed on start-up - the query-dispatcher commands effectively become nop's.

The advantage of using this is that you don't take the XQL parsing hit on server start-up (which is substantial),  and you don't have to run through the query dispatcher code on each query or chew up more memory caching queries that are stored in bytecode-compiled tcl.

I initially did this so that I could get the openacs source code to play nice with nstcl,  but it seems like it could be useful to others.  I can definitely see why you'd want to have XQL files - they came in handy when I worked on porting the OpenACS kernel to MSSQL,  for instance.  However,  for people developing apps in OpenACS (as opposed to people developing Openacs) it seems as though the XQL abstraction just slows things down.

Using the script wouldn't require re-architecting OpenACS or even any kind of direct support,  but I just wanted to broach the idea before time was spent on upgrading the qd.