On Oct 2, 2007, at 3:29 AM, Martijn Faassen wrote:

Jim Fulton wrote:

[snip]
Maybe grok was already trimmed down. In my case, I basically eliminated all ZMI support (since I didn't need it). I got about 40%,

Grok is trimmed down in the sense that it doesn't depend on all Zope 3 packages, though due to the interesting dependency structure it still relies on about 100 eggs. We didn't do any trimming down of ZMI support.

Note that it wasn't my goal to trim the number of eggs I got, although trimming that, or, in theory, using zipped eggs would speed startup as well. I'm using the zope.app.zcmlfiles egg as my base.

Would it be possible to get a list of exclude statements that you use to eliminate ZMI support in your project? I imagine our list is far from complete.

Here is the zcml file I'm including rather than incliding zope.app.zcmlfiles/configure.zcml:

  <configure
     xmlns="http://namespaces.zope.org/zope";
     xmlns:i18n="http://namespaces.zope.org/i18n";
     i18n_domain="zope"
     package="zope.app.zcmlfiles"
     >

    <exclude package="zope.app.catalog.browser" />
    <exclude package="zope.app.container.browser" />
    <exclude package="zope.app.form.browser" />
    <exclude package="zope.app.generations" />
    <exclude package="zope.app.intid.browser" />
    <exclude package="zope.app.session" file="browser.zcml" />
    <exclude package="zope.app.security.browser" />
    <exclude package="zope.app.securitypolicy.browser" />

    <exclude package="zope.app.authentication.browser" />


<exclude package="zope.app.authentication.browser" file="session.zcml" /> <exclude package="zope.app.authentication" file="ftpplugins.zcml" /> <exclude package="zope.app.authentication" file="httpplugins.zcml" /> <exclude package="zope.app.authentication" file="groupfolder.zcml" /> <exclude package="zope.app.authentication.browser" file="password.zcml" /> <exclude package="zope.app.authentication" file="principalfolder.zcml" />

    <exclude package="zc.userfolder.browser" />

    <!-- This was copied from zcmlfiles.  Bits are commented out to
         speed startup. -->

    <!-- note that we need to do this early, as later startup
         subscribers may break without fixups -->

    <exclude package="zope.app.component.browser" />
    <include package="zope.app.component" />

    <include package="zope.app.generations" file="subscriber.zcml" />

    <!-- Ordinary Application (non-view) configuration) -->
  <!--   <include package="zope.app.interface" /> -->
    <include package="zope.app.security" />
    <include package="zope.component" />
    <include package="zope.annotation" />
  <!--   <include package="zope.app.dependable" /> -->
    <include package="zope.app.content" />
    <include package="zope.publisher" />

  <!--   <include file="menus.zcml" /> -->

  <!--   <include package="zope.copypastemove" /> -->
  <!--   <include package="zope.size" /> -->
    <include package="zope.location" />
    <include package="zope.app.container" />

    <exclude package="zope.app.publisher.xmlrpc" />
    <include package="zope.app.publisher" />

    <include package="zope.app.publication" file="meta.zcml" />
    <include package="zope.app.publication" />


    <include package="zope.traversing" />
    <include package="zope.app.pagetemplate" />
  <!--   <include package="zope.app.zapi" /> -->

    <!-- Views -->
  <!--   <include package="zope.app.http" /> -->

    <!-- Translations -->
  <!--   <configure package="zope.app.locales"> -->
  <!--     <i18n:registerTranslations directory="." /> -->
  <!--   </configure> -->

    <exclude package="zope.app.i18n.xmlrpc" />
    <exclude package="zope.app.i18n.browser" />
    <include package="zope.app.i18n" />


    <!-- Database boostrapping and maintanance -->
    <include package="zope.app.appsetup" />
    <include package="zope.app.zopeappgenerations" />

    <!-- Services -->
    <include package="zope.app.principalannotation" />

    <!-- Utilities -->
  <!--   <include package="zope.app.error" /> -->

    <!-- Broken-object support -->
  <!--   <include package="zope.app.broken" /> -->

    <!-- Skins -->

  <!--   <include package="zope.app.basicskin" /> -->
    <include package="zope.app.rotterdam" />

    <!-- Additional packages -->

  <!--   <include package="zope.app.applicationcontrol" /> -->
  <!--   <include package="zope.dublincore" /> -->
    <include package="zope.app.wsgi" />


    <!-- Content types -->
  <!--   <include package="zope.app.folder" /> -->

    <!-- browser Configurations -->
    <include file="browser.zcml" />

  </configure>

Note that this was made by just copying the configure.zcml from zope.app.zcmlfiles and commenting out some things and adding excludes. I basically kept commenting things or excluding things until my tests failed. :) I could probably go a little further if I worked a lot harder, so of course, I stopped. :) I'll also probably have to add some things back later when I pay attention to i18n. (This app uses extjs for it's UI and I haven't figured out how I'm going to approach i18n for that. extjs rocks btw.)

Jim

--
Jim Fulton
Zope Corporation


_______________________________________________
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com

Reply via email to