LoadEvent firing late

I apologize in advance if this has been answered before.

My site takes roughly 34 sec to finish loading.

domContentLoaded finishes in less than 2.7 sec but LoadEvent starts up / triggers after 34 sec…
I tried changing the favicon.ico, favicon.png, favicon.svg in the htmlheader.vm to absolute links and it doesn’t seem to help.

I’m not sure how I can set it so that the favicons get triggered earlier. I additionally speed tested the playgroundxwiki, and it seems to load up under 4 seconds.

My Xwiki is on ver 10.4.
Thank you!

Ref pics from webpagetest.org:

image
image
image
image

Could you tell us which browser and version you’re using?

Do you have the possibility to try with different browsers to test if it makes a difference?

The first post is from my Chrome browser (Version 67.0.3396.79) and in the drop menu I selected to test using Chrome.

The results are similar on Firefox browser (Version 60.0.2) and selected Opera in WebPageTest.org.

On Firefox browser (and selected Firefox in WebPageTest.org) it’s a bit different - The 3 favicons are not in the LoadEvent but inside domContentLoaded. And this time /bin/resources/icons/xwiki/spinner.gif took long to load, and the result is still 35 sec to finish loading.

Ref:
image

IE/Edge browser Version 38.14393.1066.0 (selected Chrome to test) and strangely the first test came back with less than 3 sec to finish loading. The 2 extra tests still came out over 30 sec tho…

image
image

Just tested locally on the home page, for XWiki 10.5, Chrome 67 and the page fully loads in 1.60s.

I’ve checked specifically the favicon.svg resource and indeed it’s pushed to the end. That’s probably a browser feature to have this loaded last since it’s not the most important item for rendering a page :wink:

FYI for me:

52

What’s concerning is more the time it takes to get the svg file. Do you have anything between your browser and the Servlet Container containing the XWiki WAR?

Hmm… Sorry I’m not sure what you mean by anything between my browser and servlet container. My xwiki is installed on a new vps, it’s the only web app that is installed. I’m really not sure where to look further to resolve my issue :confused:

Your browser connect directly to your tomcat? No web server, no proxy, nothing else?

In short: I believe the problem is not with XWiki since I can’t reproduce it in any instance of XWiki I’ve seen.

Hm I do have cloudflare enabled. Maybe that could be an issue?
I don’t have a proxy. I have MySQL, Tomcat, and Java. No apache or proxy.