Re: [OJB-developers] Lots of class mappings in OJB Problem
Brought to you by:
thma
|
From: Thomas M. <tho...@ho...> - 2002-04-26 20:06:07
|
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 > > > > |