Debug Mode vs Production Mode

After reading https://vaadin.com/book/-/page/advanced.debug-production-modes.html, I was wondering if there were performance gains from turning on production mode for my deployed Vaadin app or is it just to prevent the user from being able to open up the debug console?

I am just asking as I want to know if I should have production mode turned on in my internal demo envrionments where I currently have this flag set to false.

-Dan

Well, the production mode disables the debug window, client-side logging, and perhaps most importantly the on-the-fly Sass theme compiler. Compiling the themes with the theme compiler (instead of relying on the on-the-fly compilation) and packaging them in the WAR speeds up the execution significantly, as otherwise the theme is compiled every time it is loaded.

Marko,

How often will a theme be reloaded during the execution of a vaadin application? Only once for each beginning session, or several times later on as well?

Stefan

A Sass theme is compiled every time a page containing a UI that uses the theme is loaded. So, if you reload the page, or open another browser window with a Vaadin UI that uses the theme, it loads and compiles the theme. The resulting CSS is not cached in any manner.