RE: [OJB-developers] Lots of class mappings in OJB Problem
Brought to you by:
thma
From: Matthew B. <ma...@so...> - 2002-04-26 20:33:36
|
I will try this asap. I'm not sure that parsing is the bottleneck, as there is a lot of work done mapping the classes. However, if this work is done once and represented inside the serialized class, that would be great. I will report back soon with statistics on where the time is being spent. m -----Original Message----- From: Thomas Mahler [mailto:tho...@ho...] Sent: Friday, April 26, 2002 2:07 PM To: Matthew Baird Cc: 'obj...@li...' Subject: Re: [OJB-developers] Lots of class mappings in OJB Problem Hi Matthew, sorry for answering late, I had been on a 3 day business trip. Matthew Baird wrote: > My project has between 200 and 250 mapped classes, and is taking a *long* > time for OJB to initialize. Is there any way to speed this up? I don't think that we speed up the parsing process much. It's already implemented with SAX, which is much faster than DOM and there is not much to improve here. But to speed up your "lots of classes" scenario I just checked in a little hack into the CVS (I made changes to ClassDescriptor, DescriptorRepository and RepositoryPersistor): It now works like follows: 1. The Persistory is asked to read in a Repository from a file (say "repository.xml"). 2. The persistor checks if a file "repository.xml.serialized" exists. 2a) if this file exists, the Persistor deserializes a DescriptorRepository instance from this file. This instance is returned and thus the slow XML parsing of "repository.xml" is avoided. 2b) if not, it performs the ordinary SAX parsing of the "repository.xml" file. The resulting repository object is immediately serialized to the file "repository.xml.serialized". Thus it can be used on the next application startup. I assume that Java-deserialization is much faster than SAX Parsing. How long does the Application startup take with this solution for your scenario? I will polish up things a little, but I think it is OK to use this stuff already. cheers, Thomas > > regards, > Matthew > > _______________________________________________ > Objectbridge-developers mailing list > Obj...@li... > https://lists.sourceforge.net/lists/listinfo/objectbridge-developers > > > > _______________________________________________ Objectbridge-developers mailing list Obj...@li... https://lists.sourceforge.net/lists/listinfo/objectbridge-developers |