<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://jogamp.org/bugzilla/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.2"
          urlbase="https://jogamp.org/bugzilla/"
          
          maintainer="sgothel@jausoft.com"
>

    <bug>
          <bug_id>1252</bug_id>
          
          <creation_ts>2015-10-11 11:31:21 +0200</creation_ts>
          <short_desc>The &quot;slim&quot; and &quot;fat&quot; deployment options source zip&apos;s differ 20Mb in size.</short_desc>
          <delta_ts>2015-10-11 12:27:18 +0200</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>3</classification_id>
          <classification>JogAmp</classification>
          <product>General</product>
          <component>builds</component>
          <version>2.4.0</version>
          <rep_platform>All</rep_platform>
          <op_sys>all</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>INVALID</resolution>
          
          <see_also>https://jogamp.org/bugzilla/show_bug.cgi?id=1253</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P4</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Xerxes Rånby">xerxes</reporter>
          <assigned_to name="Sven Gothel">sgothel</assigned_to>
          
          
          <cf_type>DEFECT</cf_type>
          <cf_scm_refs></cf_scm_refs>
          <cf_workaround>---</cf_workaround>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>5438</commentid>
    <comment_count>0</comment_count>
    <who name="Xerxes Rånby">xerxes</who>
    <bug_when>2015-10-11 11:31:21 +0200</bug_when>
    <thetext>During the review to update processing 3 to JogAmp 2.3.2 it came to our attention that the src zip have grown a lot in size.
https://github.com/processing/processing/issues/3979

Starting with JogAmp 2.3.2 we provide a &quot;fat&quot; jar, that is an all in one jar deployment option including all jogamp modules, with matching src zip.
The source zip for the &quot;fat&quot; jar deployment option is &quot;only&quot; 5.8Mb containing the sources for all jogamp modules.
http://jogamp.org/deployment/jogamp-current/fat/
jogamp-fat-java-src.zip 10-Oct-2015 05:02 5.8M

However the source zip found inside the &quot;slim&quot; deployment option is much larger &gt;25Mb!
http://jogamp.org/deployment/jogamp-current/archive/jogamp-all-platforms.7z
4,0M	gluegen-java-src.zip
76K	joal-java-src.zip
196K	jocl-java-src.zip
24M	jogl-java-src.zip

We need to look into it and check why the two deployment options &quot;slim&quot; vs &quot;fat&quot; source zip&apos;s differ that much in size.

It is expected that the size of the sum of the &quot;slim&quot; src zips sizes to match the &quot;fat&quot; src zip size.

+++

The fat jars src zip is also larger than expected
a quick review of its contents reveal that 3Mb of the &quot;fat&quot; src zip is made up by bundling the ubuntu fonts inside the src zip.
jogamp/graph/font/fonts/ubuntu/Ubuntu-*.ttf</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>5439</commentid>
    <comment_count>1</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2015-10-11 11:47:02 +0200</bug_when>
    <thetext>Invalid criteria/metric, only LOC would be sufficient 
and only iff there is no duplication or intentional &apos;take out&apos;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>5440</commentid>
    <comment_count>2</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2015-10-11 11:52:29 +0200</bug_when>
    <thetext>I continue my rant here:

Further more, the defect claim is not visible in the title of description.

Wording like &apos;have grown lot in size&apos; is too fuzzy -&gt; LOC

Wording &apos;differ&apos; is also little qualifying and could be refined,
since it forces one to _find_ a statement in the text.

Note: A proper per module LOC analysis as well as a possible binary 
location should be performed. I did that for Fosdem 2013 I guess.

Having above information, maybe there can be done a statement,
whether a bug or of informal notion.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>5441</commentid>
    <comment_count>3</comment_count>
    <who name="Xerxes Rånby">xerxes</who>
    <bug_when>2015-10-11 11:53:36 +0200</bug_when>
    <thetext>Unpacking the &quot;slim&quot; and &quot;fat&quot; src zip&apos;s reveal that they do contain the same files and have the same unpacked footprint.

 du -s -h slim/
32M	slim/
 du -s -h fat/
32M	fat/

Conclusion: the jogamp-fat-java-src.zip have much better compression!

Question: why is the compression of the &quot;slim&quot; zip&apos;s that bad?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>5443</commentid>
    <comment_count>4</comment_count>
    <who name="Xerxes Rånby">xerxes</who>
    <bug_when>2015-10-11 12:23:17 +0200</bug_when>
    <thetext>The answer why the compression level of the &quot;slim&quot; src zips are bad is because we pass level=0 to ant when we create the &quot;slim&quot; zip&apos;s.

Gluegen and JOGL uses level=0 compression
http://jogamp.org/git/?p=gluegen.git;a=blob;f=make/build.xml;hb=HEAD#l1094
http://jogamp.org/git/?p=jogl.git;a=blob;f=make/build.xml;hb=HEAD#l267
JOAL and JOCL uses default compression
http://jogamp.org/git/?p=joal.git;a=blob;f=make/build.xml;hb=HEAD#l811
http://jogamp.org/git/?p=jocl.git;a=blob;f=make/build.xml;hb=HEAD#l899

https://ant.apache.org/manual/Tasks/zip.html
&quot;level Non-default level at which file compression should be performed.
Valid values range from 0 (no compression/fastest) to 9 (maximum compression/slowest).&quot;


The &quot;fat&quot; src zip is created by unpacking the four &quot;slim&quot; src zip&apos;s and creating a new zip using the zip commands default compression.
http://jogamp.org/git/?p=jogamp-scripting.git;a=blob;f=jenkins-builds/funcs_promotion.sh;h=3896acbb4c8ff61baeef6a82cdb4ff545431badb;hb=HEAD#l294


Conclusion the difference in src zip sizes are caused by the compression level selected during creation of the &quot;slim&quot; src zip&apos;s.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>5444</commentid>
    <comment_count>5</comment_count>
    <who name="Xerxes Rånby">xerxes</who>
    <bug_when>2015-10-11 12:27:18 +0200</bug_when>
    <thetext>The reason we pass level=0 is to allow 7z to archive better compression when build the final jogamp-all-platforms.7z file

http://jogamp.org/git/?p=gluegen.git;a=commit;h=1d614e360b2018c7f4b70ebf2c9322cae5cc9c7f

Thus it is expected that the src-zip&apos;s inside the &quot;slim&quot; jogamp-all-platforms.7z archive to be larger compared to the &quot;fat&quot; deployment option src zip.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>