On Fri, Nov 18, 2011 at 4:34 PM, Ludovic Dubost <[email protected]> wrote:
> While I understand that for developers load time is important, at this
> point 15 seconds (+ the xwiki init time which would be nice to measure),
> does not seem that much.
> It's important to note that this is not time that has to be spent again
> before there is another restart of the JVM which should not even happen. We
> have plenty of servers which run full time.
>
> It would be more important to improve speed for a page once the app is
> loaded

Furthermore, having a better performance when multiple requests are
served at the same time. Right now it's possible/easy to have good
performance (say under 300ms for a simple page and no complex panel)
for individual requests, but response time increase drastically when
requests are made in parallel. This is very easy to verify with simple
CLI tools like ApacheBench and playing with the "simultaneous
requests" option.

Jerome.

>
> Ludovic
>
> 2011/11/18 Vincent Massol <[email protected]>
>
>> Hi devs,
>>
>> I've been finding that Jetty takes a lot of time to start lately. So I've
>> run some profiling on it.
>>
>> Starting Jetty (till the STARTING message) takes 15 seconds on my machine
>> (in debug mode, we win 3 seconds, ie 12s start time), split like this:
>>
>> * 50% of the time spent scanning jars in WEB-INF/lib
>> (JarInputStream.getNextJar()) - 7s
>> * 10% in Jetty itself - 2s
>> * 40% in our code in Extension Manager init (2.5s) and in Component
>> registration from their annotations (2.5s) - 5s
>>
>> If I remove the start of the EM in XWikiServletContextListener, we start
>> in 7 seconds (instead of 15s)
>>
>> If I try to start Jetty without any webapp, it starts in 500ms.
>>
>> If I remove the oldcore legacy jar (2.5MB) we win 1 second in start up
>> time.
>>
>> Note: This is all before XWiki.init() is called on the first request.
>>
>> Analysis of ComponentAnnotationLoader (2.5s):
>> * 1.2s just loading classes from the CL
>> * 1s getDeclaredFields (reflection API)
>> * 800ms initializing SLF4J
>>
>> Analysis of Extension Manager init (2.5s):
>> * In DefaultCoreExtensionScanner.loadExtensions():
>> ** 500ms URL.toURI()
>> ** 500ms MavenXpp3Reader.read() - POM reading
>> ** 150ms org.Reflections scanning
>> ** 150ms resource loading from CL (getResourceAsStream())
>> * In DefaultExtensionLicenseManager.initialize()
>> ** 314ms in org.Reflections
>> * 130ms of loading xwiki.properties
>>
>> Conclusion
>> =========
>>
>> * XWiki's size in number of JARs and their sizes makes it long to start
>> Jetty.
>> * We could make some small optimizations in EM and Component loading but
>> we wouldn't win that much, on the order of 2s in total (i.e. 15% of total
>> load time)
>>
>> Thanks
>> -Vincent
>>
>> _______________________________________________
>> devs mailing list
>> [email protected]
>> http://lists.xwiki.org/mailman/listinfo/devs
>>
>
>
>
> --
> Ludovic Dubost
> Founder and CEO
> Blog: http://blog.ludovic.org/
> XWiki: http://www.xwiki.com
> Skype: ldubost GTalk: ldubost
> _______________________________________________
> devs mailing list
> [email protected]
> http://lists.xwiki.org/mailman/listinfo/devs



-- 
Jérôme Velociter
Winesquare
http://www.winesquare.net/
_______________________________________________
devs mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/devs

Reply via email to