Page load takes more time with custom theme


when i remove the reindeer part out of my theme the page takes about 5-7s to load. When i put back in “@include reindeer;” the page will load immediately.

This is how it was created by maven:

/* Import the reindeer theme. /
This only allows us to use the mixins defined in it and does not add any styles by itself. */
@import “…/reindeer/reindeer.scss”;

/* This contains all of your theme. /
If somebody wants to extend the theme she will include this mixin. */
@mixin mytheme {
@include reindeer;

But i dont want to use the reindeer theme. So i removed the import part and the include part. But then it takes much longer to load the page. Once it loaded everything is fine…but people would think the page didnt load and leave it…

Anything i did wrong here?

Ok heres a possible solution:

I used BaseTheme and imported it. Looks like vaadin needs at least one vaadin theme so i took the most basic one. I think this will do for now.

One common thing that comes to mind is that when you use your custom theme in a development environment (productionMode false in web.xml) and there is no pre-compiled (.css, compiled from .scss with the Eclipse or Maven plug-ins) version of the theme, the SCSS theme is compiled on the fly, which might take 1-5s.

However, if the only difference in your case is not including the reindeer (or base) theme, perhaps the issue is that the loading indicator etc. is not in the theme you use so it just feels like nothing is happening for a while.

In any case, I’d strongly suggest using at least the base theme in any custom theme as it contains many rules that are needed for the correct functioning of various components.

Yeah i am in dev mode. So maybe it was compiling my theme on the fly. Will try it with production mode true later.

But BaseTheme is great. Its actually what i wanted to have but didnt know it was there until i had a look at the themes jar file :wink: