Jump to content
Excelsior Forums

ktsang

Members
  • Content count

    0
  • Joined

  • Last visited

Everything posted by ktsang

  1. JIT cache is deprecated?

    sent to java@excelsior-usa.com please check
  2. JIT cache is deprecated?

    Hi All, We want to enable code protection with our server applications and found excelsior jet is a good option. We successfully build native version of our applications by excelsior jet and it's up and running in our testing environment. Everything are okay but one of our application (with heavily used spring libraries) are found slow startup time due to many JIT compilation overhead. (Please see the attached log server_overhead.log) The startup time of native version is around 6 minutes (mostly are spent on spring context loading, which actually spent time on JIT compile spring classes) vs non native version which is around 40 seconds. To solve this issue, we try some optimized options (as below) about JIT cache but it doesn't work. It never create cache. After reading excelsior document, I learnt that JET static compiler sometimes cannot resolve dependencies. In our case, we have ApplicationContext in our main class like this: public class MyAppServer { @Autowired private ApplicationContext applicationContext; public MyAppServer() { } ... } However, the JET is not able to resolve ApplicationContext at runtime and try to JIT compile at the beginning during startup [JIT compiler] compile org.springframework.context.ApplicationContext [JIT compiler] compilation finished in 15ms, classes: 1 Attached our excelsior prj file for your reference. Please kindly advise. We have to build a native version of our applications which can run as fast as our non native version. Regards, Ken server.prj server_overhead.log
  3. JIT cache is deprecated?

    We moved all spring related libraries to CLASSPATHENTRY, the absent class list look more normal. However, we still got many JIT compilation logs like this. Your jvm is well handled CGLIB dynamic proxy but it generates huge overhead during spring context initialization. The more spring beans we defined in our app, the more JIT comiler log entries. Please advise. [JIT compiler] compile com.mycompany.myapp.service.config.AppCacheConfig$$EnhancerBySpringCGLIB$$24a5e149 [JIT compiler] compilation finished in 13ms, classes: 1 The main reason we use !module is to save external library build time. If everything are included in CLASSPATHENTRY, we required 3-4 hours for building one backend application. What is the best approach to build native server side application by JET (my applications are with over 50-100 external library jar files and 20 internal module libraries)? Our current approach is to pre-build all external libraries jar to share objects. In our prj file, we include .so file in !module and internal libraries in CLASSPATHENTRY. We tried Jet Control Panel but it is not fit for batch building 8-10 applications (with average 50-100 external libraries for each applications). So we write a java program to generate one JET prj file for one application and use the following script to build. ../../../../jet12.0-eval-amd64/bin/jc =p /home/ken/ejet/release/1.1.6/script/my-server/my-server-1.1.6-SNAPSHOT.prj cd ../../../../jet12.0-eval-amd64 source setenv cd /home/ken/ejet/release/1.1.6/script/ xpack -source ../output/my-server -target ../output/packed/my-server-native cd .. ENDTIME=$(date +%s) echo "Total Time for build my-server is $(($ENDTIME - $STARTTIME))s"
×