i think that is a great idea !

can you make a patch for me ?

here are some things i think it should have:

1. the cache should be a WeakKeyDictionary, if possible, so that an
application which creates classes on the fly doesnt run out of memory.
this adds a micro-amount of overhead vs. a dictionary but i think its
negligible (compared to all the isintance calls and yields we are
losing)
2. the cache needs to be cleared for a particular cache whenever the
attribute manager is accessed to add or modify properties on the class
(i.e. the register_attribute method)
3. the cache should *probably* be at the module level, and not within
the AttributeManager itself; SA uses only a single AttributeManager per
application so it probably doesnt matter, but a class itself is going
to have the same properties regardless of which AttributeManager
accesses it (and also resets the cache)
4. the raise should use an exception class of some kind (TypeError?
exceptions.ArgumentError?)

as far as the yield, ive no problem getting rid of that.  im beginning
to suspect that yield introduces overhead vs. a straight list ?
(python interpreter storing stack frames ?  dunno).

thanks much, this is the kind of user involvement i like.


--~--~---------~--~----~------------~-------~--~----~
 You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to