Sylvain Wallez wrote: > Stefano Mazzocchi wrote: > >> Cocoon is a complex beast, we all know this, but I find it irritating >> that people believe that cocoon is slow just because they *perceive* it >> to be so. >> >> Now, can't we polish the component manager to load packages only when >> they are required? >> >> This would also partially solve the problems of Batik requiring an X >> Server: if you don't ask for the Batik classes, they are not loaded and >> we don't have any problems (and we save lots of memory and lots of >> startup time). >> >> What do you think? >> > This is a well-known problem : developpers often complain about the long > compile-and-test round-trip time, and when making a demo on laptop to a > customer, you need good talking abilities to fill the time needed by > Cocoon to warm up :( > > We have here two contradictory siturations : > > - in development/demo phases, we want fast startup, which means load-on > demand. Also, we don't care if some parts of our app. won't run because > of a misconfiguration, missing class or wrong enviromnent : we just > don't use them for the demo and everything's ok. > > - in production phase, we don't care about startup time, but want to be > sure everything's ok at startup. This means load-on-startup, because we > don't want the app. to barf at the face of the first browser using a > missing / misconfigured component which could have been detected early. > > Avalon's ComponentManager only loads at startup today (including filling > the pools). We can update it to support both strategies. The choice > between them could be done using a Context entry coming from the servlet > init parameters. We could then change the loading strategy with a single > line in web.xml.
Currently, there is a new Container abstraction in Scratchpad that is worth looking at. It is not fully tested, but it makes use of the asynchronous CommandManager to initialize the pools and manage pool size. It's pretty cool. It will allow for faster start times as well. > > Thoughts ? > > Also, about Batik : if your app. doesn't produce dynamic images, don't > declare the SVG serializer and Batik won't load. Otherwhise, you're very > likely to need an X server to render the images ;) I agree, no optional component should be loaded unless it is needed. > > Finally [shameless plug], don't forget the TreeProcessor which greatly > improves sitemap load time ! +1 +1 +1 ---------------------------------------------------- Sign Up for NetZero Platinum Today Only $9.95 per month! http://my.netzero.net/s/signup?r=platinum&refcd=PT97 --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]