Theme files loading taking longer time

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Theme files loading taking longer time

Pawan Verma
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
Reply | Threaded
Open this post in threaded view
|

Re: Theme files loading taking longer time

Pierre Smits-3
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 <[hidden email]>
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
>
Reply | Threaded
Open this post in threaded view
|

Re: Theme files loading taking longer time

James Yong-2
In reply to this post by Pawan Verma
Hi Pawan,

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

Regards,
James

On 2020/05/06 11:33:15, Pawan Verma <[hidden email]> 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
>
Reply | Threaded
Open this post in threaded view
|

Re: Theme files loading taking longer time

Jacques Le Roux
Administrator
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 <[hidden email]> 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
>>
Reply | Threaded
Open this post in threaded view
|

Re: Theme files loading taking longer time

Pawan Verma
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 <[hidden email]>
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 <[hidden email]>
> 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
> >>
>
Reply | Threaded
Open this post in threaded view
|

Re: Theme files loading taking longer time

Nicolas Malin-2
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

pEpkey.asc (2K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Theme files loading taking longer time

Jacques Le Roux
Administrator
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

Reply | Threaded
Open this post in threaded view
|

Re: Theme files loading taking longer time

Pawan Verma
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 <
[hidden email]> 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
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Theme files loading taking longer time

Pierre Smits-3
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 <[hidden email]>
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 <
> [hidden email]> 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
> >
> >
>