Steve Alexander wrote:
I've been reading the discussions on benchmarks of BTreeFolder verus standard ObjectManager dict based folders.
I have a BTreeFolder w/ Customizer support that I'd like to include in the DataSkinAddons package for its next release. I'll probably release a LargeUI Folder w/ Customizer Support, that has the BTreeFolder UI anyway.
However, I'm not sure whether to store the folder contents in a dict or a BTree.
Are dictionaries or BTrees the way to go for folders with lots of sub-objects? Anyone tried any other benchmarks?
I *suppose* it could even be configurable:
How about this for an idea:
* Management interface uses the standard Folder interface when the number of objects in the contents are less than a certain amount. With more objects, it switches to the BTree Folder UI. This number can be reconfigured as an attribute of the folder.
Have you considered a batching UI? The consensus here at DC when we had the meeting about big folders was that folders with lots of objects ought to batch. However, once I saw how fast a simple list is, I lost interest in batching.
* You can switch between using a dict and a BTree to store the sub-objects, on an instance-by-instance basis. The switch-over will be slow, but it will be easier than changing the base-class of existing instances.
You'll probably get the biggest win just by replacing the custom __getattr__ method with a C version. I understand that switching from C to Python and back to C again is expensive, but a C version would turn the path into C->C->C. It might level the benchmarks. Shane