1

I am learning to develop addon for Firefox. What i observed is for each jpm sign the size of validated .xpi increases two fold from the previous .xpi file size even though the addon file change is very minimal.

Following illustrates the scenario:

02/22/2016  04:42 PM            10,067 el-0.0.1-fx+an.xpi
02/22/2016  05:52 PM            20,357 el-0.0.2-fx+an.xpi
03/01/2016  01:04 AM            44,443 el-0.0.4-fx+an.xpi
03/01/2016  01:49 AM            89,953 el-0.0.5-an+fx.xpi
03/01/2016  11:34 PM           180,059 el-0.0.6-an+fx.xpi

Can anyone please let me know what is the reason behind this? And it would be good to know the possible option to retain the relative file size to the amount of code change.

bprasanna
  • 2,423
  • 3
  • 27
  • 39

1 Answers1

2

Sorry for posting the answer, it will more readable in that way. Well, it took me a while to figure out the issue. Though the jpm sign creates a temporary @xyz.xpi file, it takes all the .xpi files in the work directory and bundles them in a single .xpi file leading to exponential increase in size (sum of all the .xpi file sizes).

After removing old the *.xpi files, now the size of newly signed .xpi file is quite reasonable relative to the code size.

In the presence of old .xpi files:

02/22/2016  04:42 PM            10,067 el-0.0.1-fx+an.xpi
02/22/2016  05:52 PM            20,357 el-0.0.2-fx+an.xpi
03/01/2016  01:04 AM            44,443 el-0.0.4-fx+an.xpi
03/01/2016  01:49 AM            89,953 el-0.0.5-an+fx.xpi
03/01/2016  11:34 PM           180,059 el-0.0.6-an+fx.xpi

After removing old .xpi files:

03/02/2016  03:51 PM            15,783 el-0.0.8-fx+an.xpi
bprasanna
  • 2,423
  • 3
  • 27
  • 39
  • Thanks for sharing, you might have some words to contribute here - https://github.com/mozilla-jetpack/jpm/issues/355 ? – Noitidart Mar 06 '16 at 09:08