I have some general questions ... trying to think of ways to improve the performance of a CMS, an art history timelines database app that uses objects extensively. There are artists, resources, pictures, categories, etc, all represented as objects. each object contains functionality to load itself up from the database, and some objects contain other objects (cats contain resources and other cats, resources contain pictures, artists contain... etc etc).
While the code is highly manageable, it's beginning to be a little query-intensive because, if, say, I load up 100 resources, each of which contains pics and an artist, etc, that could translate to 300-400 sql calls.
Essentially the option is - revert back to more procedural code and eliminate extra db queries from the objects (something I don't want to do) or bypass the db alltogether and use XML and XSL. For many reasons I would like to use XML here.
One obvious benefit: displaying a hierarchical category on the links page, or a hierarchical dropdown select list of all categories - this could be stored in one XML file with all neessary metadata, rather than using a recursive sql query to build the hierarchy. then i can start adding resources, etc. to this hierarchy...
It would be easy to add the functionality for objects to give xml representations of themselves, and then save that to files, and load the files up on the frontend.
What I'd like to know here, is if anyone has done this, and if they can share some insight, or links to tuts, etc.
I don't want to stop using mysql, it's obviously better for lots of things like searching, etc. so it would be a mix of the two. I'd just like to get some discussion going to save me some time 🙂
input and ideas appreciated!
frizzo