Property Storage Bloat Question
Hi, If I store a moderately frequently changed property on a Folder will only the folder object get tacked on the end of Data.fs when the folder changes or will it be the folder object plus all the objects in the folder? cheers, Chris
Chris Withers wrote:
Hi,
If I store a moderately frequently changed property on a Folder will only the folder object get tacked on the end of Data.fs when the folder changes or will it be the folder object plus all the objects in the folder?
Assuming the Folder contains persistent objects, then only the folder will be written. However, "just the folder" includes all the folder's instance attributes, which includes a list of the ids+metatypes of the folder's contents, as well as its security attributes, other properties such as "title", and so on. You can get around this in Zope by using a webdav propertysheet to store your property in. This is a separate persistent object, and so won't cause all the rest of your folder's attributes to be written when that property changes. <zpatterns_stuff> I've got around this using ZPatterns, by using a folder that is derived from DataSkin, and having a special attribute provider just for that one property/attribute. Basically, I designed the app, then looked at which properties were getting updated too often, then told ZPatterns to store those properties in a separate BTree. </zpatterns_stuff> -- Steve Alexander Software Engineer Cat-Box limited
Steve Alexander wrote:
You can get around this in Zope by using a webdav propertysheet to store your property in. This is a separate persistent object, and so won't cause all the rest of your folder's attributes to be written when that property changes.
How do you add a webdav propertysheet to a folder? How do you edit one via WebDAV? ;-) chairs, Chris
Chris Withers wrote:
How do you add a webdav propertysheet to a folder?
http://server/folder_url/propertysheets/manage_addPropertySheet?id=foo&ns=ba...
How do you edit one via WebDAV?
No idea. I haven't really used WebDAV much. -- Steve Alexander
Steve Alexander wrote:
Chris Withers wrote:
How do you add a webdav propertysheet to a folder?
http://server/folder_url/propertysheets/manage_addPropertySheet?id=foo&ns=ba...
I think I'll stick with hack of storing in the properties page of a DTML Document.
How do you edit one via WebDAV?
No idea. I haven't really used WebDAV much.
Anyone else? cheers, Chris
Chris Withers writes:
If I store a moderately frequently changed property on a Folder will only the folder object get tacked on the end of Data.fs when the folder changes or will it be the folder object plus all the objects in the folder? The objects in the folder should be represented by the list of their oids. This list is rewritten, the objects themselves should not.
If you use a BTree-Folder, then only the oid of the BTree would be rewritten, not its content. Dieter
participants (3)
-
Chris Withers -
Dieter Maurer -
Steve Alexander