struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sreekanth S. Nair" <sreekanth.n...@egovernments.org>
Subject Re: Struts2 initial page loading time
Date Thu, 21 Jul 2016 15:11:54 GMT
Hi Adam,
               With ref to my previous reply i hope this is nothing to do
with spring, since this delay is happening after struts spring
initialization phase. And yes we have component scanning enabled for spring
which we are limiting to our own package, similar to the one you have
mentioned.


On Thu, Jul 21, 2016 at 8:35 PM, Adam Brin <abrin@digitalantiquity.org>
wrote:

> In your spring configuration, what packages are you scanning?  It could be
> that you’re not limiting things to just your package tree. For example, in
> our spring @Configuration class, we have the following:
>
> @ComponentScan(basePackages = { "org.tdar" },
>         excludeFilters = {
>                 @Filter(type = FilterType.ASSIGNABLE_TYPE,
>                         value = {
>                                 SimpleAppConfiguration.class
>                         })
>         })
>
> --
> _________________________________________________________
> Adam Brin
> Director of Technology, Digital Antiquity
> 480.965.1278
>
> > On Jul 21, 2016, at 8:02 AM, Sreekanth S. Nair <
> sreekanth.nair@egovernments.org> wrote:
> >
> > Hi Lukasz,
> >                  I have debugged through the code (version : 2.3.24.1)
> and
> > found the most time taking (marked in *red*) process ie at
> > DefaultConfiguration#reloadContainer class when loading provider called
> > convention.PackageProvider
> >
> > // Then process any package providers from the plugins
> > Set<String> packageProviderNames =
> > container.getInstanceNames(PackageProvider.class);
> > for (String name : packageProviderNames) {
> >    PackageProvider provider =
> > container.getInstance(PackageProvider.class, name);
> >    provider.init(this);
> >    *provider.loadPackages(); //Taking long time here*
> >    packageProviders.add(provider);
> > }
> >
> >
> > for the first time page loads. The same issue is there in 2.5.2 as well.
> Is
> > it may be a default behavior to take time ?
> >
> >
> >
> >
> >
> >
> >
> >
> > On Thu, Jul 21, 2016 at 12:10 PM, Sreekanth S. Nair <
> > sreekanth.nair@egovernments.org> wrote:
> >
> >> Sure Lukasz...
> >>
> >>
> >> On Thu, Jul 21, 2016 at 11:57 AM, Lukasz Lenart <
> lukaszlenart@apache.org>
> >> wrote:
> >>
> >>> 2016-07-21 8:22 GMT+02:00 Sreekanth S. Nair <
> >>> sreekanth.nair@egovernments.org>:
> >>>> May be... We are using strust2-spring-plugin. I'm not pretty sure
> about
> >>>> this plugin internal, need to investigate on this where its spending
> >>> time.
> >>>
> >>> This plugin replaces the Struts ObjectFactory with a Spring
> >>> ObjectFactory which simply delegates object instantiating to the
> >>> Spring, it would be good if you could share results of your
> >>> investigation.
> >>>
> >>>
> >>> Regards
> >>> --
> >>> Łukasz
> >>> + 48 606 323 122 http://www.lenart.org.pl/
> >>>
> >>> ---------------------------------------------------------------------
> >>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> >>> For additional commands, e-mail: user-help@struts.apache.org
> >>>
> >>>
> >>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message