yui / yui3

A library for building richly interactive web applications.
http://yuilibrary.com/
Other
4.12k stars 1.29k forks source link

Re-architect LazyModelList and ModelList so that LML isn't a subclass of ML #1020

Closed clarle closed 11 years ago

clarle commented 11 years ago

Right now, LazyModelList is a subclass of ModelList, with several of the key functions in ModelList being overridden (_add, _clear, _remove) in order to get it to properly work with non-Model objects.

This works well, but might not be the best thing to do if we're looking to extend work on YAF later on. It's better to have ModelList subclass LazyModelList, or if possible, make it so that a ModelList by default is lazy, and only become a "regular" ModelList if specified or a Model is added to it.

I'll add more discussion to this issue as it comes up.

clarle commented 11 years ago

This won't provide any performance benefits, so I won't be going further with this. See here for more details:

https://groups.google.com/forum/#!topic/yui-contrib/68XyipCOqSo