Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 366740

Summary: Shrinksafe Generated JavaScript During Deployment
Product: z_Archived Reporter: Brian Svihovec <svihovec>
Component: EDTAssignee: Yun Feng Ma <mayunf>
Status: CLOSED FIXED QA Contact:
Severity: enhancement    
Priority: P1 CC: chenzhh, smythew, tww
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard: RUI_Optimization
Bug Depends on:    
Bug Blocks: 367818    
Attachments:
Description Flags
Patch
none
Patch none

Description Brian Svihovec CLA 2011-12-14 13:40:44 EST
In the past, we have used Dojo Shrink Safe to compress our generated JavaScript code during deployment.  We should implement something similar in EDT to remove white space, reduce the amount of text being sent over the wire, and obfuscate a users source code.
Comment 1 Tony Chen CLA 2011-12-28 01:27:36 EST
May need a CQ to use Dojo Shrink Safe. Jimmy, please take care of this.
Comment 2 Tony Chen CLA 2012-01-04 21:46:26 EST
updated subject to differentiate it with gzip HTTP. 

Set this to I1
Comment 3 Brian Svihovec CLA 2012-01-05 10:10:40 EST
I have opened the following CQ for distributing ShrinkSafe with EDT - http://dev.eclipse.org/ipzilla/show_bug.cgi?id=5944
Comment 4 Yun Feng Ma CLA 2012-01-10 09:22:14 EST
Created attachment 209261 [details]
Patch

Here is a patch for this. Tony, could you help review it. Thanks.

It's pending on the CQ now.
Comment 5 Brian Svihovec CLA 2012-01-10 16:48:49 EST
The API for ShrinksSafe has changed with the latest version, which should be downloaded from here - http://download.dojotoolkit.org/current-stable/dojo-release-1.6.1-shrinksafe.zip  (This can only be committed when our CQ is approved)

The 1.7R1 version of js.jar should be downloaded from here - ftp://ftp.mozilla.org/pub/mozilla.org/js/rhino1_7R1.zip (Again, this can only be committed when our CQ is approved).

Do we still think we need a VMArg to disable compression?  That was only added in RBD in case we found a need to turn it off.

Will the edt_runtime_all.js file be compressed with this patch?
Comment 6 Yun Feng Ma CLA 2012-01-11 10:26:29 EST
(In reply to comment #5)
> The API for ShrinksSafe has changed with the latest version, which should be
> downloaded from here -
> http://download.dojotoolkit.org/current-stable/dojo-release-1.6.1-shrinksafe.zip
>  (This can only be committed when our CQ is approved)
> 
> The 1.7R1 version of js.jar should be downloaded from here -
> ftp://ftp.mozilla.org/pub/mozilla.org/js/rhino1_7R1.zip (Again, this can only
> be committed when our CQ is approved).
> 
> Do we still think we need a VMArg to disable compression?  That was only added
> in RBD in case we found a need to turn it off.
I think we can leave it there now, in case the shrink breaks any thing.

> 
> Will the edt_runtime_all.js file be compressed with this patch?
Yes, the edt_runtime_all.js file should be compressed. But the patch didn't process it, I will fix it. Thanks.
Comment 7 Yun Feng Ma CLA 2012-01-12 04:01:07 EST
Move this to I2, as the CQ can not get done in I1. Thanks.
Comment 8 Yun Feng Ma CLA 2012-02-01 01:17:31 EST
Hi Brian, is the CQ for ShrinkSafe done? Can I proceed this enhancement now? Thanks a lot.
Comment 9 Brian Svihovec CLA 2012-02-01 08:43:12 EST
The CQ is not ready.
Comment 10 Brian Svihovec CLA 2012-02-08 14:27:09 EST
The CQ has been approved for RHINO - http://dev.eclipse.org/ipzilla/show_bug.cgi?id=5960
Comment 11 Yun Feng Ma CLA 2012-02-12 08:33:50 EST
Hi Brian, 

The CQ for RHINO was passed, is the CQ for ShrinkSafe passed? Thanks.
Comment 12 Brian Svihovec CLA 2012-02-13 10:13:55 EST
Yun Feng, you are right, the Shrinksafe CQ is still not accepted (http://dev.eclipse.org/ipzilla/show_bug.cgi?id=5944).
Comment 13 Brian Svihovec CLA 2012-02-22 16:20:05 EST
[CQ 5944] Dojo Shrinksafe Version: 1.6.1 has been approved for commit to CVS.
Comment 14 Brian Svihovec CLA 2012-03-01 16:29:08 EST
Will you be able to check this code in by Friday?
Comment 15 Yun Feng Ma CLA 2012-03-01 19:34:02 EST
I will get the patch in today. Thanks a lot.
Comment 16 Yun Feng Ma CLA 2012-03-02 10:56:38 EST
Created attachment 211978 [details]
Patch

Here is the patch I checked in. Thanks.
Comment 17 Yun Feng Ma CLA 2012-03-02 10:57:15 EST
Patch is in now. Resolved this one. Thanks.
Comment 18 Lisa Lasher CLA 2012-03-30 17:51:07 EDT
close