quarkusio / quarkus

Quarkus: Supersonic Subatomic Java.
https://quarkus.io
Apache License 2.0
13.76k stars 2.68k forks source link

CLI jar is file system heavy (21 MB) #18098

Open rsvoboda opened 3 years ago

rsvoboda commented 3 years ago

Quarkus CLI jar is file system heavy (21 MB)

du -h devtools/cli/target/quarkus-cli-999-SNAPSHOT-runner.jar
 21M    devtools/cli/target/quarkus-cli-999-SNAPSHOT-runner.jar

du -h ~/Downloads/spring-2.5.1/lib/spring-boot-cli-2.5.1.jar
 15M    /Users/rsvoboda/Downloads/spring-2.5.1/lib/spring-boot-cli-2.5.1.jar

du -h ~/Downloads/micronaut-2.0.0.M2/cli-2.0.0.M2.jar
 14M    /Users/rsvoboda/Downloads/micronaut-2.0.0.M2/cli-2.0.0.M2.jar

CLI jar contains 13640 class files and 663 non-class files

unzip -l devtools/cli/target/quarkus-cli-999-SNAPSHOT-runner.jar | grep '\.class$' | wc -l
   13640
unzip -l devtools/cli/target/quarkus-cli-999-SNAPSHOT-runner.jar | grep -v '\.class$' | grep -v '/$' | wc -l
     663

~2500 class files are under com.google.something package

unzip -l devtools/cli/target/quarkus-cli-999-SNAPSHOT-runner.jar | cut -d':' -f2- | cut -d' ' -f4- | grep '/' | grep -v META | sed 's/\(.*\)\/.*/\1/'  | grep "com/google" | wc -l
    2503

Listing top 50 packages in the CLI jar:

unzip -l devtools/cli/target/quarkus-cli-999-SNAPSHOT-runner.jar | cut -d':' -f2- | cut -d' ' -f4- | grep '/' | grep -v META | sed 's/\(.*\)\/.*/\1/'  | sort | uniq -c | sort -n -r | head -50
 897 com/google/common/collect
 313 com/google/common/util/concurrent
 273 io/netty/handler/codec/http2
 227 picocli
 225 com/google/inject/internal
 222 io/netty/handler/ssl
 185 io/netty/channel
 168 io/quarkus/qute
 162 com/google/common/base
 160 org/apache/commons/codec/language/bm
 154 io/smallrye/config
 127 io/smallrye/mutiny/operators/multi
 125 com/google/common/graph
 123 io/netty/buffer
 122 com/google/common/cache
 118 org/jsoup/parser
 116 io/netty/handler/codec/http
 107 io/netty/util/internal
 102 io/netty/util
 100 io/quarkus/arc/impl
  96 org/apache/commons/compress/archivers/zip
  96 io/netty/util/collection
  89 com/google/common/io
  89 com/google/common/hash
  86 io/netty/handler/codec/compression
  85 io/netty/util/concurrent
  85 com/fasterxml/jackson/databind/deser/std
  81 io/netty/handler/codec/http/websocketx
  80 org/eclipse/sisu/inject
  79 io/smallrye/mutiny/groups
  76 com/fasterxml/jackson/databind/ser/std
  75 com/google/common/reflect
  72 com/fasterxml/jackson/annotation
  71 org/jboss/threads
  71 com/fasterxml/jackson/databind/introspect
  69 io/netty/handler/codec
  69 com/fasterxml/jackson/databind
  68 org/jboss/logmanager/formatters
  68 com/google/inject/spi
  67 io/netty/handler/codec/spdy
  66 org/eclipse/sisu/plexus
  65 org/apache/http/impl/client
  65 org/apache/commons/lang3
  65 com/google/common/primitives
  63 org/apache/commons/lang3/time
  62 io/smallrye/mutiny/operators/uni
  61 org/jsoup/select
  61 org/apache/http/impl/cookie
  58 org/apache/log4j
  57 com/fasterxml/jackson/databind/util

For non-class files these are the most common ones:

unzip -l devtools/cli/target/quarkus-cli-999-SNAPSHOT-runner.jar | grep -v '\.class$' | grep -v '/$' | cut -d':' -f2- | cut -d' ' -f4- | grep '/' | sed 's/\(.*\)\/\(.*\)/\2/' | sort | uniq -c | sort -n -r | head -40
 108 pom.xml
 108 pom.properties
  42 codestart.yml
  21 README.tpl.qute.md
   9 pom.tpl.qute.xml
   8 native-image.properties
   6 index.entry.qute.html
   6 ..gitignore
   4 {resource.class-name}.tpl.qute.java
   4 application.yml
   4 .gitkeep
   3 {resource.class-name}Test.tpl.qute.scala
   3 {resource.class-name}Test.tpl.qute.kt
   3 {resource.class-name}Test.tpl.qute.java
   3 {resource.class-name}.tpl.qute.scala
   3 {resource.class-name}.tpl.qute.kt
   3 build.tpl.qute.gradle.kts
   3 build.tpl.qute.gradle
   3 Person.java
   3 Native{resource.class-name}IT.tpl.qute.scala
   3 Native{resource.class-name}IT.tpl.qute.kt
   3 Native{resource.class-name}IT.tpl.qute.java
   3 Messages.i18n.properties
   2 version.properties
   2 payload.json
   2 package.html
   2 libjansi.so
   2 jansi.dll
   2 gradlew.bat
   2 gradlew
   2 gradle.tpl.qute.properties
   2 gradle-wrapper.jar
   2 gc.properties
   2 build-layout.include.qute
   2 application.properties
   2 FunqyTest.java
   2 FunqyIT.java
   1 {command.class-name}.tpl.qute.java
   1 {class-name-base}Test.tpl.qute.java
   1 {class-name-base}ResourceTest.tpl.qute.java
quarkus-bot[bot] commented 3 years ago

/cc @ebullient, @gsmet, @matejvasek, @maxandersen, @patriot1burke

maxandersen commented 2 years ago

The "weight" seem to come from inclusion of maven-core which is part of quarkus-devtools-common.

Not sure we can cut that out/reduce it much as its included to provide basic features.

maxandersen commented 2 years ago

tip, ran this to get puml graph:

mvn com.github.ferstl:depgraph-maven-plugin:4.0.2:for-artifact -DgroupId=io.quarkus -DartifactId=quarkus-cli -Dversion=2.13.0.CR1 -DcreateImage=true -DgraphFormat=puml