Django, epix phail #4 - The road to hell. 11
I started to write this from the perspective of "Ruby has this and Django don't" but I realised that was wrong, and started again.
Django implements Multiple Table Inheritance, and to a degree that works nicely, BUT, because the data for a single object is strewn over several tables, it can get VERY slow to iterate across a large collection of objects and resolve exactly which object we have.
Depending on the hierarchy, it can take many 10s of milliseconds to find the real object we want. That is not so bad, but when
you are iterating across a collection of a couple of hundred items, those 10ms add up to considerable delay.
As a consequence, you try to do everything you can to avoid having to resolve to the 'real object'. This leads you into sin.
The real issue is that once you have started down the path of OO sinfulness, you start trying to be clever about it, and the code gets not just sinful, but fiendish. You start off with a nice clean OO structure, that requires you to resolve to the real object, and when you
hit situations where you are iterating over a large set of objects and so you get clobbered by 100s of 10ms piling up, you take a shortcut, changing your OO structure to try to remove the requirement to resolve the objects. This good intention gets layed down in
front of you like a paving slab, making it look like you are making progress and keeping things neat, but all around you the monsters are gathering, sharpening their knives as your path becomes ever narrower, darker and deeper.
Now, I know that all the Django heads out there are going to say, 'well, you should have done it THIS way'. Well, maybe next time I will, but right now, I am down here fighting monsters and trying desperately to stay afloat.
4suykQ mksplvxmgftn, [url=http://gvidmupeoggu.com/]gvidmupeoggu[/url], [link=http://vymjywotyfio.com/]vymjywotyfio[/link], http://cqjsylmppufw.com/
SCUZbv vtualappqayx, [url=http://qsqubldcsfgh.com/]qsqubldcsfgh[/url], [link=http://eeyoljtnbwyf.com/]eeyoljtnbwyf[/link], http://upvvyuuqiwot.com/