You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by Pawan Verma <pa...@hotwaxsystems.com> on 2020/05/06 11:33:15 UTC

Theme files loading taking longer time

Hello Devs,

Greetings for the day, I hope you all are doing well in this pandemic
situation.

I wanted to bring your attention to a case where it takes a lot of time to
load the themes to the cache.
On checking, I found that OFBiz searches all the Theme.xml files under
ofbiz.home with 'themes' as a partial path written under
ThemeFactory.pullModelThemesFromXmlToCache(). The problem occurs mainly
when the runtime data is huge in the system, and it increases the time
since the current code also scans the Theme.xml under runtime directory.

What should we do to resolve this issue?
A solution comes to mind which is to include 'themes' directory in the
basePath for the searching of Theme.xml file.

Please advise and share your thoughts.
-- 
Thanks & Regards
Pawan Verma
Technical Consultant
*HotWax Systems*
*Enterprise open source experts*
http://www.hotwaxsystems.com

Re: Theme files loading taking longer time

Posted by Pierre Smits <pi...@apache.org>.
Hi Pawan,

I can imagine that this can be come a huge negative factor, when the
implementing adopter includes a lot of themes for both back-end and
front-ends. Though I would guess that the adopter would have one for
back-end. But with a multitude of front-ends and each having its own theme
it would be cumbersome.

Maybe a disentanglement of various themes is in order?

Met vriendelijke groet,

Pierre Smits
*Proud* *contributor** of* Apache OFBiz <https://ofbiz.apache.org/> since
2008 (without privileges)

*Apache Trafodion <https://trafodion.apache.org>, Vice President*
*Apache Directory <https://directory.apache.org>, PMC Member*
Apache Incubator <https://incubator.apache.org>, committer
Apache Steve <https://steve.apache.org>, committer


On Wed, May 6, 2020 at 1:33 PM Pawan Verma <pa...@hotwaxsystems.com>
wrote:

> Hello Devs,
>
> Greetings for the day, I hope you all are doing well in this pandemic
> situation.
>
> I wanted to bring your attention to a case where it takes a lot of time to
> load the themes to the cache.
> On checking, I found that OFBiz searches all the Theme.xml files under
> ofbiz.home with 'themes' as a partial path written under
> ThemeFactory.pullModelThemesFromXmlToCache(). The problem occurs mainly
> when the runtime data is huge in the system, and it increases the time
> since the current code also scans the Theme.xml under runtime directory.
>
> What should we do to resolve this issue?
> A solution comes to mind which is to include 'themes' directory in the
> basePath for the searching of Theme.xml file.
>
> Please advise and share your thoughts.
> --
> Thanks & Regards
> Pawan Verma
> Technical Consultant
> *HotWax Systems*
> *Enterprise open source experts*
> http://www.hotwaxsystems.com
>

Re: Theme files loading taking longer time

Posted by Pierre Smits <pi...@apache.org>.
With respects to (optional) themes we should consider to move those to a
separate repository or to individual repositories, offering our (potential)
more opt-in choices.
Met vriendelijke groet,

Pierre Smits
*Proud* *contributor** of* Apache OFBiz <https://ofbiz.apache.org/> since
2008 (without privileges)

*Apache Trafodion <https://trafodion.apache.org>, Vice President*
*Apache Directory <https://directory.apache.org>, PMC Member*
Apache Incubator <https://incubator.apache.org>, committer
Apache Steve <https://steve.apache.org>, committer


On Tue, May 12, 2020 at 11:22 AM Pawan Verma <pa...@hotwaxsystems.com>
wrote:

> Hi Nicolas,
>
> Thanks for the feedback. We have reduced the path to only themes and
> plugins directory under OFBIZ-11665
> <https://issues.apache.org/jira/browse/OFBIZ-11665>.
>
> I've found that two themes i.e. multiflex and e-commerce are loaded from
> plugins.
> --
> Thanks & Regards
> Pawan Verma
> Technical Consultant
> *HotWax Systems*
> *Enterprise open source experts*
> http://www.hotwaxsystems.com
>
>
> On Tue, May 12, 2020 at 1:04 AM Jacques Le Roux <
> jacques.le.roux@les7arts.com> wrote:
>
> > Le 11/05/2020 à 16:56, Nicolas Malin a écrit :
> > >   (and I don't understand why I haven't did at the beginning)
> >
> > Hi Nicolas,
> >
> > Could be because of the partialPath parameter of findXmlFiles().
> >
> > It's a bit confusing at 1st glance, this method lacks of documentation :/
> >
> > Jacques
> >
> >
>

Re: Theme files loading taking longer time

Posted by Pawan Verma <pa...@hotwaxsystems.com>.
Hi Nicolas,

Thanks for the feedback. We have reduced the path to only themes and
plugins directory under OFBIZ-11665
<https://issues.apache.org/jira/browse/OFBIZ-11665>.

I've found that two themes i.e. multiflex and e-commerce are loaded from
plugins.
-- 
Thanks & Regards
Pawan Verma
Technical Consultant
*HotWax Systems*
*Enterprise open source experts*
http://www.hotwaxsystems.com


On Tue, May 12, 2020 at 1:04 AM Jacques Le Roux <
jacques.le.roux@les7arts.com> wrote:

> Le 11/05/2020 à 16:56, Nicolas Malin a écrit :
> >   (and I don't understand why I haven't did at the beginning)
>
> Hi Nicolas,
>
> Could be because of the partialPath parameter of findXmlFiles().
>
> It's a bit confusing at 1st glance, this method lacks of documentation :/
>
> Jacques
>
>

Re: Theme files loading taking longer time

Posted by Jacques Le Roux <ja...@les7arts.com>.
Le 11/05/2020 à 16:56, Nicolas Malin a écrit :
>   (and I don't understand why I haven't did at the beginning)

Hi Nicolas,

Could be because of the partialPath parameter of findXmlFiles().

It's a bit confusing at 1st glance, this method lacks of documentation :/

Jacques


Re: Theme files loading taking longer time

Posted by Nicolas Malin <ni...@nereide.fr>.
Hello Pawan,

By default I use de basePath to include themes and plugins directory.

With this we can load a theme by the plugins system.

So two possibilities, reduce the path to only these tow directories (and
I don't understand why I haven't did at the beginning) or exclude the
possibility to load a theme as plugin

Nicolas

On 07/05/2020 16:03, Pawan Verma wrote:
> Thank you all for the feedback. Here is the Jira ticket:
> https://issues.apache.org/jira/browse/OFBIZ-11665

Re: Theme files loading taking longer time

Posted by Pawan Verma <pa...@hotwaxsystems.com>.
Thank you all for the feedback. Here is the Jira ticket:
https://issues.apache.org/jira/browse/OFBIZ-11665
-- 
Thanks & Regards
Pawan Verma
Technical Consultant
*HotWax Systems*
*Enterprise open source experts*
http://www.hotwaxsystems.com


On Thu, May 7, 2020 at 2:58 PM Jacques Le Roux <ja...@les7arts.com>
wrote:

> Hi,
>
> I have a look at the code, it's not obvious, a Jira fits
>
> Jacques
>
> Le 07/05/2020 à 07:45, James Yong a écrit :
> > Hi Pawan,
> >
> > +1 to the use of more specific basePath for the search
> >
> > Regards,
> > James
> >
> > On 2020/05/06 11:33:15, Pawan Verma <pa...@hotwaxsystems.com>
> wrote:
> >> Hello Devs,
> >>
> >> Greetings for the day, I hope you all are doing well in this pandemic
> >> situation.
> >>
> >> I wanted to bring your attention to a case where it takes a lot of time
> to
> >> load the themes to the cache.
> >> On checking, I found that OFBiz searches all the Theme.xml files under
> >> ofbiz.home with 'themes' as a partial path written under
> >> ThemeFactory.pullModelThemesFromXmlToCache(). The problem occurs mainly
> >> when the runtime data is huge in the system, and it increases the time
> >> since the current code also scans the Theme.xml under runtime directory.
> >>
> >> What should we do to resolve this issue?
> >> A solution comes to mind which is to include 'themes' directory in the
> >> basePath for the searching of Theme.xml file.
> >>
> >> Please advise and share your thoughts.
> >> --
> >> Thanks & Regards
> >> Pawan Verma
> >> Technical Consultant
> >> *HotWax Systems*
> >> *Enterprise open source experts*
> >> http://www.hotwaxsystems.com
> >>
>

Re: Theme files loading taking longer time

Posted by Jacques Le Roux <ja...@les7arts.com>.
Hi,

I have a look at the code, it's not obvious, a Jira fits

Jacques

Le 07/05/2020 à 07:45, James Yong a écrit :
> Hi Pawan,
>
> +1 to the use of more specific basePath for the search
>
> Regards,
> James
>
> On 2020/05/06 11:33:15, Pawan Verma <pa...@hotwaxsystems.com> wrote:
>> Hello Devs,
>>
>> Greetings for the day, I hope you all are doing well in this pandemic
>> situation.
>>
>> I wanted to bring your attention to a case where it takes a lot of time to
>> load the themes to the cache.
>> On checking, I found that OFBiz searches all the Theme.xml files under
>> ofbiz.home with 'themes' as a partial path written under
>> ThemeFactory.pullModelThemesFromXmlToCache(). The problem occurs mainly
>> when the runtime data is huge in the system, and it increases the time
>> since the current code also scans the Theme.xml under runtime directory.
>>
>> What should we do to resolve this issue?
>> A solution comes to mind which is to include 'themes' directory in the
>> basePath for the searching of Theme.xml file.
>>
>> Please advise and share your thoughts.
>> -- 
>> Thanks & Regards
>> Pawan Verma
>> Technical Consultant
>> *HotWax Systems*
>> *Enterprise open source experts*
>> http://www.hotwaxsystems.com
>>

Re: Theme files loading taking longer time

Posted by James Yong <ja...@apache.org>.
Hi Pawan,

+1 to the use of more specific basePath for the search

Regards,
James

On 2020/05/06 11:33:15, Pawan Verma <pa...@hotwaxsystems.com> wrote: 
> Hello Devs,
> 
> Greetings for the day, I hope you all are doing well in this pandemic
> situation.
> 
> I wanted to bring your attention to a case where it takes a lot of time to
> load the themes to the cache.
> On checking, I found that OFBiz searches all the Theme.xml files under
> ofbiz.home with 'themes' as a partial path written under
> ThemeFactory.pullModelThemesFromXmlToCache(). The problem occurs mainly
> when the runtime data is huge in the system, and it increases the time
> since the current code also scans the Theme.xml under runtime directory.
> 
> What should we do to resolve this issue?
> A solution comes to mind which is to include 'themes' directory in the
> basePath for the searching of Theme.xml file.
> 
> Please advise and share your thoughts.
> -- 
> Thanks & Regards
> Pawan Verma
> Technical Consultant
> *HotWax Systems*
> *Enterprise open source experts*
> http://www.hotwaxsystems.com
>