[Chandler-dev] help in resolving the filters-loading-items problem
Andi Vajda
vajda at osafoundation.org
Mon Jun 12 16:23:33 PDT 2006
A long standing performance bug is that some filter expressions used by
FilteredCollections use an expression that causes the entire item (or more) to
be loaded. Normally, this is not a problem but it becomes one when the
collection becomes part of another collection and an index is created from
scratch on the new collection causing all the collections making it up to be
iterated for item UUIDs. For a FilteredCollection to return an member item's
UUID, it needs to first test whether the item is a member (unless it has an
index of its own) and that can cause the item (and whatever else the filter
expression needs to run) to get loaded.
There are currently two collections in the Chandler source that still use
regular attribute access (hence loading the item) instead of view.findValue().
This is because their filter relies on several other items to come up with a
True or False answer.
To resolve this, I proposed a 'bequeatheTo' feature which is like
'inheritFrom' but in reverse. Whenever a value in such an attribute changes,
the attribute(s) mentioned in its 'bequeatheTo' aspect would be given that
value as well. That way, these values could be cached on the item being tested
by the FilteredCollection, allowing view.findValue() use thereby preventing
the item from being loaded.
Andi..
More information about the chandler-dev
mailing list