Strangely slow page loading on first load or refresh

Hello guys,
I want to mention about a strange problem I had recently. I could not find any solution in forum so I struggled and solved myself. In case somebody can face with this problem, I am writing the solution here.

My development platform is :
vaadin 7.1.11
STS 2.9.0 (eclipse 3.7.2 based)
jrebel 5.5.3
using totally custom theme that I wrote style.css my own

The problem was when I refresh or first load vaadin app it takes approx. 5 seconds to load the page. I checked first firebug in case of any network slow down or slow down in js and css file loading but nothing found. All files are totally loaded in total 10ms. After that I tried disabling jrebel but it did not work too. Then I tried vaadin in debug mode and noticed that “Assumig CSS loading is not complete. postponing render phase. (.v-loading-indicator height == 0)” in logs.

In first look the expression “(.v-loading-indicator height == 0)” something like whispering to me it could be the solution. I assumed the bootstrap.js of vaadin checks the height of div.v-loading-indicator to render the page in first load. Because I changed the css of .v-loading-indicator and removed the height propery !.

After that I added css height property (the value is not important just have to be graeter than 0) on .v-loading-indicator and bingo !

I just want to share my experience on this issue, so in vaadin custom themers has to be carefull before changing the base css. Thanks to everyone

I ca’t thank you enough. It works beautifully. You just saved me from going mad.