if u replace back the offending function with its plain pythonic variant, will it work?
50% boost... just because of the python? u're constructing too many queries over and over. try cache them, and reuse as building blocks... - or cache their results... or change the model. e.g. on my model initialy i had 4500 queries constructed and issued, after some caching they went to 4000 and then to about 1100. Now they under 10... one big query for lots of objects instead of thousands of small queries per-piece. And it is still near same model which was made to allow efficient usage - but noone used that. On Wednesday 11 June 2008 00:13:55 Artur Siekielski wrote: > On Jun 10, 6:11 pm, [EMAIL PROTECTED] wrote: > > well.. see the difference, the function that eats the time is > > sql.sort_tables. all else is nearly same. > > compare the two sources and see for yourself. > > the sort_tables() itself seems same, but traversing (recursive) > > has changed a lot. from depth first into breadth first or > > similar. > > > > something is going on there. > > You're right. I have looked at 0.4.4 - 0.4.5 diff but don't see > anything suspicious. > > > AFAIremember psyco can optimize loops and arithmetics but is very > > bad with func-calls. > > > > profile both versions of that function without psyco and see > > what's difference in funccalls etc. > > I don't think such a huge performance decrease could be caused by > more function calls. I think it must be Psyco's bug. As I've > written I've also experienced some strange errors. > > I understand that it's very hard to debug. 50% performance boost is > noticeable but I can (must :)) live without it. > > > ciao > > > > svilen > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~----------~----~----~----~------~----~------~--~---
