On Apr 18, 2015, at 7:38 PM, Adrian Crum <adrian.c...@sandglass-software.com> wrote:
> I checked the commit logs - the double parsing was introduced in rev 1633182. > yes, and no. I did that commit and it was a good enhancement: before that, the start component, was parsing the filesystem and was adding to the classpath all the jars (including the ones from disabled components). I introduced the additional parsing to avoid this (and with that commit I could remove a useless, if not problematic, Classloader) but I agree that with a refactoring we could optimize the code more. I would appreciate if you could share some notes about how you would like to proceed (as there are different ways and some may be better that others). Jacopo PS: I am not asking the patch for RTC, I am just asking some details about the refactoring you have in mind > Adrian Crum > Sandglass Software > www.sandglass-software.com > > On 4/18/2015 6:12 PM, Adrian Crum wrote: >> I spent the day looking through the OFBiz startup code to see if there >> is any way we can shorten the startup time. >> >> Something I noticed that seems odd... >> >> Start.java searches the OFBiz folders for all instances of >> ofbiz-component.xml files, parses them, and builds a class path based on >> their contents. Then Start.java loads the components using >> ComponentContainer.java, and that class also parses ofbiz-component.xml >> files. So the ofbiz-component.xml files are parsed twice. >> >> I would like to redesign the component loading a bit to eliminate the >> double parsing. >> >> What do you think? >> >>