By default your Play application will be fully started (compiled, Global
's onStart
called, etc.) only after you do http request to it.
Is there a way to disable this lazy load and make Play app compile code and do startup once application process is run?
PS: I am using Play 2.3.
UPDATE: As Ryan pointed out lazy load happens only in dev. mode. Nevertheless I still need to disable it, despite this is relevant only to apps running in dev. mode.
To disable lazy loading on a specific post or page, open the post or page, and in the “Cache Options” meta box, un-check the “LazyLoad for images” option. Don't forget to publish or update the post or page to save your changes.
Lazy-loading images and video reduces initial page load time, initial page weight, and system resource usage, all of which have positive impacts on performance.
Lazy loading affords you and your users two major benefits: Performance improvement. With lazy loading, you use only the resources for the relevant content, eliminating unnecessary content requests, reducing the processing power for content rendering, and loading your site faster.
Today, lazy loading is widely used in web applications to improve application performance. It helps developers reduce loading times, optimize data usage and improve the user experience. However, overusing lazy loading can affect the application performance negatively.
Lazy loading only applies in dev mode (play run
). Production mode is not lazy.
https://www.playframework.com/documentation/2.3.x/Production
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With