Hi,

I was modifying templates and found a way to keep using embedded tomcat while being able to easily modify the templates (since then I tried using templates outside of classpath[1]) :

gradle unzipWAR && java -cp "build/app:build/app/WEB-INF/classes:build/app/WEB-INF/lib/*" org.springframework.boot.loader.WarLauncher

I wondered why it was much faster to start... So I tested various possibilities. (NB: I often enable jdwp by default just in case it can be useful to see things with a debugger)

Below are some quite astonishing results...


            elapsed         CPU
  WarLauncher on exploded WAR       18 s            25 s
  WarLauncher on exploded WAR + jdwp        18 s            26 s
  java -jar cas.war         37 s            47 s
  java -jar cas.war + jdwp          96 s            109 s
  tomcat (exploded ou war)          33 s            43 s
  tomcat + jdwp             36 s            46 s
                     
  OVERHEADS:                 
  java -jar cas.war         106 %           88 %
  tomcat            83 %            72 %
  jdwp (for WarLauncher on exploded WAR)            0 %             4 %
  jdwp (for java -jar cas.war)      159 %           132 %
  jdwp (for tomcat)         9 %             7 %

tested with
- AdoptOpenJDK 15.0.2+7 (also tested debian openjdk 11.0.6+10-1~bpo9+1 with only minor changes)
- CAS 6.4.2 with various modules
- tomcat 9.0.54
- somewhat old OS : debian 9 on VMware

details:
- WarLauncher on exploded WAR = java -cp "build/app:build/app/WEB-INF/classes:build/app/WEB-INF/lib/*" org.springframework.boot.loader.WarLauncher
- CPU = "TIME" column of ps (ie "accumulated cpu time, user + system")
- elapsed = time it takes to reach CAS "Ready to process requests"


Liens:
------
[1] https://fawnoos.com/2021/02/16/cas63-ui-themes/

--
- Website: https://apereo.github.io/cas
- Gitter Chatroom: https://gitter.im/apereo/cas
- List Guidelines: https://goo.gl/1VRrw7
- Contributions: https://goo.gl/mh7qDG
--- You received this message because you are subscribed to the Google Groups "CAS Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/a/apereo.org/d/msgid/cas-user/20211120123849.Horde.TuyPqAN5b_s0umWoiWbhudP%40courrier.univ-paris1.fr.

Reply via email to