You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by Adrian Crum <ad...@sandglass-software.com> on 2015/04/18 19:12:04 UTC

Start.java Issue

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?


-- 
Adrian Crum
Sandglass Software
www.sandglass-software.com

Re: Start.java Issue

Posted by Adam Heath <do...@brainfood.com>.
My freetime has been aimed at ofbiz.  That change is on my list.

On 04/18/2015 03:20 PM, Adrian Crum wrote:
> RTC will bring the project to a screeching halt - because no one 
> reviews anything. I'm still waiting for feedback on the entity cache 
> fix I committed a while ago.
>
> Adrian Crum
> Sandglass Software
> www.sandglass-software.com
>
> On 4/18/2015 8:08 PM, Pierre Smits wrote:
>> We should learn from the past, not repeat it. RTC would have brought 
>> this
>> aspect of the improvement in r1633182 earlier to our attention than CTR.
>>
>> Best regards,
>>
>> Pierre Smits
>>
>> *ORRTIZ.COM <http://www.orrtiz.com>*
>> Services & Solutions for Cloud-
>> Based Manufacturing, Professional
>> Services and Retail & Trade
>> http://www.orrtiz.com
>>
>> On Sat, Apr 18, 2015 at 7:39 PM, Adrian Crum <
>> adrian.crum@sandglass-software.com> wrote:
>>
>>> There have been many Start.java refactorings in the past that did not
>>> require review. Why is this one different?
>>>
>>> Adrian Crum
>>> Sandglass Software
>>> www.sandglass-software.com
>>>
>>> On 4/18/2015 6:24 PM, Jacques Le Roux wrote:
>>>
>>>> Le 18/04/2015 19:12, Adrian Crum a écrit :
>>>>
>>>>> 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?
>>>>>
>>>>>
>>>>>   This would need a review to confirm, but if the double parsing is
>>>> useless then indeed a refactoring seems the way.
>>>> This is the kind of change we could wait to be reviewed before
>>>> committing, but not necessarily since we can always revert
>>>>
>>>> Jacques
>>>>
>>>
>>


Re: Start.java Issue

Posted by Jacques Le Roux <ja...@les7arts.com>.
Le 18/04/2015 22:20, Adrian Crum a écrit :
> RTC will bring the project to a screeching halt - because no one reviews anything. I'm still waiting for feedback on the entity cache fix I 
> committed a while ago.

"no one reviews anything. "
That's *almost* right Adrian, we review some I believe ;) and I think Pierre has a point here, as your previous email about r1633182 shows.

I think it's something we should really care more about. For important commits in the core, we can't rely only on one person, even among our most 
experienced core developers.
Obviously the "deeper" a commit is, the more chances are it has a negative impact, contrary to a change, for instance, at the UI level. We have proofs 
everyday, having something working is not enough.
We (all committers) should even, as a priority, focus on such changes. Of course it's not the easiest job so we often prefer to close our eyes and 
rely on others, I know, I do that.

Now, I don't believe asking for review on such important patch attached to a Jira would throw OFBiz in "a screeching halt", at least when it's not 
about a bug fix. Refactoring and improving is nice, but we all know it also introduce some risks. I have the feeling we crossed some regressions we 
could have avoided with a more community minded spirit.  I know you often ask for reviews when doing such changes and we sometimes lack to provide 
them. But that should not prevent us to ask for RTC when we have the feeling it should be done. I did in the recent past by attaching patches to Jira, 
not sure I got more attention, but at least I tried.

We knowcoercion is impossible due to the nature of the project. So maybe putting more pressure (reiterated, if no feedbacks) on RTC requests would 
help, before committing something w/o enough eyes balls reviews. And a patch in a Jira is the best way to keep things focused.

BTW I will begin by doing the reviews I promised I would do...

Thanks!

Jacques

>
> Adrian Crum
> Sandglass Software
> www.sandglass-software.com
>
> On 4/18/2015 8:08 PM, Pierre Smits wrote:
>> We should learn from the past, not repeat it. RTC would have brought this
>> aspect of the improvement in r1633182 earlier to our attention than CTR.
>>
>> Best regards,
>>
>> Pierre Smits
>>
>> *ORRTIZ.COM <http://www.orrtiz.com>*
>> Services & Solutions for Cloud-
>> Based Manufacturing, Professional
>> Services and Retail & Trade
>> http://www.orrtiz.com
>>
>> On Sat, Apr 18, 2015 at 7:39 PM, Adrian Crum <
>> adrian.crum@sandglass-software.com> wrote:
>>
>>> There have been many Start.java refactorings in the past that did not
>>> require review. Why is this one different?
>>>
>>> Adrian Crum
>>> Sandglass Software
>>> www.sandglass-software.com
>>>
>>> On 4/18/2015 6:24 PM, Jacques Le Roux wrote:
>>>
>>>> Le 18/04/2015 19:12, Adrian Crum a écrit :
>>>>
>>>>> 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?
>>>>>
>>>>>
>>>>>   This would need a review to confirm, but if the double parsing is
>>>> useless then indeed a refactoring seems the way.
>>>> This is the kind of change we could wait to be reviewed before
>>>> committing, but not necessarily since we can always revert
>>>>
>>>> Jacques
>>>>
>>>
>>
>

Re: Start.java Issue

Posted by Pierre Smits <pi...@gmail.com>.
'no one reviews anything' is misleading because not true. We do what we
can.

Seeking collaboration and consensus is a far better attitude than putting
Code over Community. CTR regarding improvements is putting Code over
Community.

Is creating an improvement issue, attaching patches and seeking
collaboration for review before applying the patch after 72 hours to much
work?

Best regards,

Pierre Smits

*ORRTIZ.COM <http://www.orrtiz.com>*
Services & Solutions for Cloud-
Based Manufacturing, Professional
Services and Retail & Trade
http://www.orrtiz.com

On Sat, Apr 18, 2015 at 10:20 PM, Adrian Crum <
adrian.crum@sandglass-software.com> wrote:

> RTC will bring the project to a screeching halt - because no one reviews
> anything. I'm still waiting for feedback on the entity cache fix I
> committed a while ago.
>
> Adrian Crum
> Sandglass Software
> www.sandglass-software.com
>
> On 4/18/2015 8:08 PM, Pierre Smits wrote:
>
>> We should learn from the past, not repeat it. RTC would have brought this
>> aspect of the improvement in r1633182 earlier to our attention than CTR.
>>
>> Best regards,
>>
>> Pierre Smits
>>
>> *ORRTIZ.COM <http://www.orrtiz.com>*
>>
>> Services & Solutions for Cloud-
>> Based Manufacturing, Professional
>> Services and Retail & Trade
>> http://www.orrtiz.com
>>
>> On Sat, Apr 18, 2015 at 7:39 PM, Adrian Crum <
>> adrian.crum@sandglass-software.com> wrote:
>>
>>  There have been many Start.java refactorings in the past that did not
>>> require review. Why is this one different?
>>>
>>> Adrian Crum
>>> Sandglass Software
>>> www.sandglass-software.com
>>>
>>> On 4/18/2015 6:24 PM, Jacques Le Roux wrote:
>>>
>>>  Le 18/04/2015 19:12, Adrian Crum a écrit :
>>>>
>>>>  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?
>>>>>
>>>>>
>>>>>   This would need a review to confirm, but if the double parsing is
>>>>>
>>>> useless then indeed a refactoring seems the way.
>>>> This is the kind of change we could wait to be reviewed before
>>>> committing, but not necessarily since we can always revert
>>>>
>>>> Jacques
>>>>
>>>>
>>>
>>

Re: Start.java Issue

Posted by Adrian Crum <ad...@sandglass-software.com>.
RTC will bring the project to a screeching halt - because no one reviews 
anything. I'm still waiting for feedback on the entity cache fix I 
committed a while ago.

Adrian Crum
Sandglass Software
www.sandglass-software.com

On 4/18/2015 8:08 PM, Pierre Smits wrote:
> We should learn from the past, not repeat it. RTC would have brought this
> aspect of the improvement in r1633182 earlier to our attention than CTR.
>
> Best regards,
>
> Pierre Smits
>
> *ORRTIZ.COM <http://www.orrtiz.com>*
> Services & Solutions for Cloud-
> Based Manufacturing, Professional
> Services and Retail & Trade
> http://www.orrtiz.com
>
> On Sat, Apr 18, 2015 at 7:39 PM, Adrian Crum <
> adrian.crum@sandglass-software.com> wrote:
>
>> There have been many Start.java refactorings in the past that did not
>> require review. Why is this one different?
>>
>> Adrian Crum
>> Sandglass Software
>> www.sandglass-software.com
>>
>> On 4/18/2015 6:24 PM, Jacques Le Roux wrote:
>>
>>> Le 18/04/2015 19:12, Adrian Crum a écrit :
>>>
>>>> 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?
>>>>
>>>>
>>>>   This would need a review to confirm, but if the double parsing is
>>> useless then indeed a refactoring seems the way.
>>> This is the kind of change we could wait to be reviewed before
>>> committing, but not necessarily since we can always revert
>>>
>>> Jacques
>>>
>>
>

Re: Start.java Issue

Posted by Pierre Smits <pi...@gmail.com>.
We should learn from the past, not repeat it. RTC would have brought this
aspect of the improvement in r1633182 earlier to our attention than CTR.

Best regards,

Pierre Smits

*ORRTIZ.COM <http://www.orrtiz.com>*
Services & Solutions for Cloud-
Based Manufacturing, Professional
Services and Retail & Trade
http://www.orrtiz.com

On Sat, Apr 18, 2015 at 7:39 PM, Adrian Crum <
adrian.crum@sandglass-software.com> wrote:

> There have been many Start.java refactorings in the past that did not
> require review. Why is this one different?
>
> Adrian Crum
> Sandglass Software
> www.sandglass-software.com
>
> On 4/18/2015 6:24 PM, Jacques Le Roux wrote:
>
>> Le 18/04/2015 19:12, Adrian Crum a écrit :
>>
>>> 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?
>>>
>>>
>>>  This would need a review to confirm, but if the double parsing is
>> useless then indeed a refactoring seems the way.
>> This is the kind of change we could wait to be reviewed before
>> committing, but not necessarily since we can always revert
>>
>> Jacques
>>
>

Re: Start.java Issue

Posted by Adrian Crum <ad...@sandglass-software.com>.
There have been many Start.java refactorings in the past that did not 
require review. Why is this one different?

Adrian Crum
Sandglass Software
www.sandglass-software.com

On 4/18/2015 6:24 PM, Jacques Le Roux wrote:
> Le 18/04/2015 19:12, Adrian Crum a écrit :
>> 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?
>>
>>
> This would need a review to confirm, but if the double parsing is
> useless then indeed a refactoring seems the way.
> This is the kind of change we could wait to be reviewed before
> committing, but not necessarily since we can always revert
>
> Jacques

Re: Start.java Issue

Posted by Jacques Le Roux <ja...@les7arts.com>.
Le 18/04/2015 19:12, Adrian Crum a écrit :
> 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?
>
>
This would need a review to confirm, but if the double parsing is useless then indeed a refactoring seems the way.
This is the kind of change we could wait to be reviewed before committing, but not necessarily since we can always revert

Jacques

Re: Start.java Issue

Posted by Adrian Crum <ad...@sandglass-software.com>.
https://issues.apache.org/jira/browse/OFBIZ-6268

Adrian Crum
Sandglass Software
www.sandglass-software.com

On 4/19/2015 7:22 AM, Adrian Crum wrote:
> I will create a Jira issue and supply a patch for review.
>
> Adrian Crum
> Sandglass Software
> www.sandglass-software.com
>
> On 4/19/2015 7:13 AM, Jacopo Cappellato wrote:
>>
>> On Apr 18, 2015, at 7:38 PM, Adrian Crum
>> <ad...@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?
>>>>
>>>>
>>

Re: Start.java Issue

Posted by Adrian Crum <ad...@sandglass-software.com>.
I will create a Jira issue and supply a patch for review.

Adrian Crum
Sandglass Software
www.sandglass-software.com

On 4/19/2015 7:13 AM, Jacopo Cappellato wrote:
>
> On Apr 18, 2015, at 7:38 PM, Adrian Crum <ad...@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?
>>>
>>>
>

Re: Start.java Issue

Posted by Jacopo Cappellato <ja...@hotwaxsystems.com>.
On Apr 18, 2015, at 7:38 PM, Adrian Crum <ad...@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?
>> 
>> 


Re: Start.java Issue

Posted by Adrian Crum <ad...@sandglass-software.com>.
I checked the commit logs - the double parsing was introduced in rev 
1633182.

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?
>
>