I did manage to get them a bit smaller. 1k to about 38k on Disk. We are releasing our next version with a modified Velocity 1.6.3 which does serialize to disk. We use JBoss Cache for the caching layer. So basically everything lazy loads from the resource loader then all is cached even on restart :-) Huge for us as we can have millions of Velocity files in our system.
I would love to see Velocity allow Templates/Resources to be Serializable at some point. I was able to make it work in 1.6.3 in about 6 hours. The thing is though for us VelocityEngine is a Singleton so I expose him and get the Runtime services and all that way on Deserialization making all that stuff transient. Thanks, Jason Tesser dotCMS Lead Development Manager 1-305-858-1422 On Fri, Mar 26, 2010 at 1:58 PM, Nathan Bubna <[email protected]> wrote: > That's very strange. A lot of work went into reducing memory (RAM) > usage and reducing CPU bottlenecks in 1.6. As far as i know, you are > the only one currently working to serialize templates. Without > knowing more about how you are modifying things to be serialized, it > is hard to say why they are taking so much more disk space now. I > don't believe the template object structure became that much more > complicated. I'd imagine that there are more internal references > that need to be made transient. I can't imagine that 160k of data is > needed to deserialize a 1k template string. > > On Wed, Feb 3, 2010 at 4:36 PM, Jason Tesser <[email protected]> > wrote: > > I modified velocity code so that I can serialize templates in both 1.6.3 > and > > 1.5. > > > > in 1.5 the objects were like 88k are now 160k or so. The actual string > > meaning text in the velocity template is only about 1k. > > > > Any ideas? Can I reduce this? The size is getting out of control. > > > > Thanks, > > Jason Tesser > > dotCMS Lead Development Manager > > 1-305-858-1422 > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > >
