Is there a way to save the JAVA JIT information for the next run so that i don't have to warm up the code every day?

你离开我真会死。 提交于 2019-11-30 17:41:01

You could use an ahead-of-time compiler like JET or GCJ, but I don't believe there's any standard way to save the JIT form. Keep in mind that this ties your program into the architecture you're running on, but it sounds like you're aware and accepting of this.

One option is to control the number of invocations needed for a method to be considered eligible for JIT compile.

-XX:CompileThreshold (default 10000).

You could play around various values to tune up with your application.

Please note that setting this to ZERO is NOT recommended.

Can you just keep your app running? What happens if you just have your app sleep until the next day rather than shutting down? You will then save time starting up the JVM as well as potentially skipping the jitting phase.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!