On Tue, Jan 13, 2009 at 2:39 PM, Richard Fairhurst <rich...@systemed.net> wrote:
> Where the raw SQL approach scores is in the read operations, which are > incredibly simple, easy-to-understand queries. In Potlatch these are > whichways and getway, in the XML API it'd be the /map call. The disadvantage > of using Rails in this context is obviously that you have this huge overhead > to create objects for every way or node, simply to serialise them and > dispose of the objects immediately. Because they're reads, there are > (generalising a bit) no integrity issues: and because they're very common > calls, you get a significant speedup. As far as I'm concerned this is the most "interesting" bit for a rails discussion. Given that, especially in the map call, we take many rows from a db table and serialise them to xml, it's a complete waste of time to try to read all the rows first, then serialise them all after that. They really don't depend on one another in any way. The (apparent) lack of a railsy way to read-serialise-stream row-by-row is a PITA. Cheers, Andy _______________________________________________ dev mailing list dev@openstreetmap.org http://lists.openstreetmap.org/listinfo/dev