The 2021 Payara Platform Survey was completed in April. Our surveys help us shape the future of Payara Server and Payara Micro as they give us an idea what features and enhancements the community would like to see in future releases. Surveys also provide an opportunity for you to tell us what needs to improve and after finding 14% of respondents indicated the speed of deployment is not as fast as they would like, we wanted to share a tip.
A common theme of survey responses for how we could improve the Payara Platform involved some variations of deployment speed, including:
- Slow server start
- Slow server restart during production
- Payara Server is too heavy
If you've been having similar thoughts - here's a solution to try!
Redeploying Apps vs. Restarting Payara Server
A possible reason that Payara Server appears slow during development might be the fact that you request a restart of the server when you want to test out the updated application. A restart means that all modules needs to be initialised again, which is not needed. A redeploy of the application is enough.
Instead of stopping the server and starting it again, here is how you can do a redeploy of the application in the various IDEs.
You can right click on the deployed application and ask for a restart. This will only redeploy the application and not restart the server.
With the IntelliJ IDEA, you can also update the application through icons. Besides a redeploy as shown in the image, you can also update the Java classes (Hot Swap classes). This works perfectly when you only changed some code within methods and the signature is not changed. It offers the advantage of being even faster than a redeploy of the application.
The NetBeans plugin for Payara already provides the integration of the Hot Redeploy functionality that is available within the Payara Server code.
When you enable this, in combination with the 'Deploy on Save' option, the redeploy is faster since it only changes the application with the need for a redeployment of the application. You can read more about this feature in the blog Hot Deploy Feature in Payara Platform 5.201.
Improve Payara Micro Performance when Restarting
While issues with Payara Micro speed was not mentioned by our survey responses, we thought we'd also pass along this tip for improving Payara Micro's performance when testing your application and restarting.
A restart of Payara Micro is required as the deployment model of Payara Micro doesn't support redeployments. But when you do not need the Domain Data Grid functionality (you do not access the Hazelcast instance or make use of the JCache functionality), you can make the startup much faster by specifying the --nocluster parameter.
Want to see the survey results, including a list of features and enhancements requested? Click here.