Lots of JS.setTimeout calls during client initialization

we have a vaadin application running in aws ec2 (behind elb) with rds database - basically the usual scenario.

Relativelly recently we noticed - that the loading of the root context is taking way too long. Nothing seems to happen for the first 8seconds.
Then everything loads fairly swiftly and runs smoothly as expected. It is really just the initial load which takes too long and it is not related to the session. Every single load of that context just takes those 8seconds.

We did some investigations via Chrome DevTools and there seems to be approx. 7seconds idling time - where lots of setTimeout javascript invocations seem to happen. This starts after widgetset javascript (the ${id}.cache.js) gets loaded - probably as a result of onScriptDownloaded event handler. I enclosed a screenshot of this weird behavior as it was captured via Chrom DevTools’ Timeline.

Has anyone had a similar issue?
Can anyone shed any light on where to start looking and what to check?

Thank you in advance!

Further debugging of this issue has shown some issues related to use of Overlay…
There is a warning message in Vaadin Debugging log (see attached screenshot):

Could not determine ApplicationConnection for Overlay. Overlay will be attached directly to the root panel

After that there is no message in the log for 5seconds…
Just before the “ApplicationConnection for Overlay” message - there is another interesting INFO message:

Assuming CSS loading is not complete, postponing render phase. (.v-loading-indicator height == 0)



The screenshot tells that the CSS files may have not loaded properly. Is your application’s theme okay? Are you correctly using mytheme as the theme name?

Hi Emmanuelle,
you pointed us the right direction.

One of the vaadin’s css was modfiied and while the theme was being renderred correctly - it screwed up the whole vaadin js bootstrapping somehow.

We are under time pressure - therefore cannot narrow down to the root cause, but the thing was that some sections were simply commented out and some remained active.

Thank you!

Glad to be of help. Goodluck with your project. :slight_smile: