Sign in to follow this  
mkouts

Fusioncharts JS compression

Recommended Posts

Hi,

 

Can anybody tell me which JS compressor is used for the standard Fusionchart distribution? I would also appreciate if anybody who tried Google Closure Compiler with Fusioncharts share his/her opinion on whether or not it is safe to use the "Advanced" compression level. In my test it results in ~30% smaller files.

 

Thank you,

Michael Kouts

Edited by mkouts

Share this post


Link to post
Share on other sites

I tried Closure Compiler and it seems to break the code with both SIMPLE and ADVANCED compression level. I would still appreciate if somebody tells me what is the best  (and safe) JS compressor for Fusioncharts.

 

Thank you,

Michael Kouts

Share this post


Link to post
Share on other sites

Hi,

 
FusionCharts uses simple google-closure-compiler version 20160208.4.0 for distributing JS files. So the JS files are already compressed to the "simple" compression level, re-compressing is not required.
 
Though advanced compression is not supported as of now. We have passed to feedback to respective team and we will notify you about the same soon.

Hope this helps.

Share this post


Link to post
Share on other sites

Ayan,

 

Thank you for the response. I was trying the latest google-closure-compiler and had some problems with the result it produced. I will try to use the version you specified. I need to make some changes to the Fusioncharts code (our license allows that) hence the need to compress it. I would appreciate if you can check for me whether you use standard command line options or you had to use some additional ones to get the working code after compression.

 

Thank you,

Michael Kouts

Share this post


Link to post
Share on other sites

Hi, 

 
Thanks for replying back.
 
FusionCharts uses standard tools (closure - compiler configuration) only no additional tools and configuration are used and JS files that are distributed in package are already compressed /minified.
 

Share this post


Link to post
Share on other sites

Ayan,

 

Just to be clear - I am not talking about JS from the distribution package that are already minified. Our licensed distribution also includes the Fusioncharts source code. I've made some changes to some of the files and need to compress them. If I understand you right you use google-closure-compiler version 20160208.4.0 with the standard command line options. Something like: "java -jar closure-compiler-v20160208.jar --js sources\fusioncharts.js --js_output_file js\fusioncharts.js" without any additional options like '--third_party' etc. Am I correct?

 

Thank you,

Michael Kouts

Share this post


Link to post
Share on other sites

Ayan,

 

It seems that google closure-compiler v20160208 works for me with the default compilation level. Thank you for your help. Just to let you know - the latest version v20161201 breaks Fusioncharts code (at least in my tests).

 

Thank you,

Michael Kouts

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this