[Zope-dev] advice on MountedFileStorage changes.

Anthony Baxter anthony@interlink.com.au
Sun, 11 Jun 2000 16:21:52 +1000


I've nearly completed the code to make MountedFileStorage able to 
create new FileStorages on demand, _however_... 

I'm hitting a bit of a problem with the Product initialisation. Right
now I'm just calling OFS.Application.initialize(), which goes through
and re-imports all the products, and adds them to the global meta_types
list. This is bad - it means it's slow as hell reimporting everything, 
and everything gets listed twice. It's fine after a restart, but that's 
not much help.

I can't just skip product initialisation, as it's kinda needed to create
objects in the sub-zodb.

So, approaches I'm considering:

  passing a flag through initialize() saying 'don't put products in the
  meta_types' (seems hacky).

  subclassing OFS.Application.Application, and copying the method except
  for the last line that alters the meta_types (fragile - have to track 
  changes to the main body of code).

  trying something else entirely, such as copying the products from the
  main products folder, and installing them that way... ?

Any ideas appreciated.

(There's an ongoing issue, too - there will need to be some sort of
way to copy any new/changed Products from the main ZODB to the children...)

Anthony