JPlag icon indicating copy to clipboard operation
JPlag copied to clipboard

Jar almost 50MB large as it bundles Scala language

Open JanWittler opened this issue 2 years ago • 4 comments

The JPlag Jar is currently 46.8 MB large which appears unnecessary high to me. If unpacked, you can see that this is mainly due to bundling the entire Scala language which unpacked is 77 MB. This is not a critical issue but we should think about how we can reduce the memory footprint of the Jar. Options I currently see are to use a different Scala language module parser or to somehow dynamically poll language modules instead of always bundling all.

JanWittler avatar Aug 11 '22 09:08 JanWittler

The positive thing is that as soon as we clean up the dependencies. Only the packaged CLI will has this large size. (And of course, everyone who uses scala)

dfuchss avatar Aug 11 '22 11:08 dfuchss

In the future, we may release two versions of JPlag (and thus two Jars):

  • Slim: Only the main programming languages
  • Full: All programming languages, modeling languages and text

tsaglam avatar Feb 09 '23 09:02 tsaglam

Currently there is a need for @MetaInfServices(de.jplag.Language.class) in a language (unless that is old information).

Can't that be used to make an empty JPlag framework jar, and a bunch of jars (one for each language) so the user can download the parts they want and combine them locally?

alberth avatar Mar 06 '23 11:03 alberth

Currently there is a need for @MetaInfServices(de.jplag.Language.class) in a language (unless that is old information).

Yes, the languages are currently located by the service loader.

Can't that be used to make an empty JPlag framework jar, and a bunch of jars (one for each language) so the user can download the parts they want and combine them locally?

Yes, that would be possible. Each language could be an additional jar; running them locally would require them to be in the same directory, afaik. We currently, however, favor a solution where we have two versions of JPlag to download. A base version with the most commonly used languages that has a small size. And then an extended version including the larger language modules and more exotic languages like the EMF modeling language module. However, this decision is not final so there is still room for discussions.

tsaglam avatar Mar 07 '23 15:03 tsaglam