Skip to main content

Bug Tracker

Side navigation

#10770 closed enhancement (wontfix)

Opened November 12, 2011 06:12PM UTC

Closed January 18, 2012 03:43AM UTC

Last modified March 14, 2012 10:53AM UTC

Investigate re-ordering build file

Reported by: dcherman Owned by:
Priority: low Milestone: None
Component: build Version: 1.7
Keywords: Cc:
Blocked by: Blocking:
Description

By changing the order that the various .js files are included, you can change the eventual gzipped output.

This is due to the way duplicate string elimination works on 32KB boundaries - since the minified source of jQuery will be greater than that, re-ordering them can change the results.

http://en.wikipedia.org/wiki/DEFLATE#Duplicate_string_elimination

There's an existing pull request that reduces size by 140 gzipped bytes, however the re-ordering may be too drastic. That said, you can still improve the results by a lesser degree by moving a couple of them around.

https://github.com/jquery/jquery/pull/595

Attachments (0)
Change History (8)

Changed November 13, 2011 08:19PM UTC by timmywil comment:1

component: unfiledbuild
keywords: → 1.8-discuss
priority: undecidedlow
status: newopen
version: git1.7

Changed December 13, 2011 02:53PM UTC by jzaefferer comment:2

description: By changing the order that the various .js files are included, you can change the eventual gzipped output. \ \ This is due to the way duplicate string elimination works on 32KB boundaries - since the minified source of jQuery will be greater than that, re-ordering them can change the results. \ \ http://en.wikipedia.org/wiki/DEFLATE#Duplicate_string_elimination \ \ There's an existing pull request that reduces size by 140 gzipped bytes, however the re-ordering may be too drastic. That said, you can still improve the results by a lesser degree by moving a couple of them around. \ \ https://github.com/jquery/jquery/pull/595By changing the order that the various .js files are included, you can change the eventual gzipped output.\ \ This is due to the way duplicate string elimination works on 32KB boundaries - since the minified source of jQuery will be greater than that, re-ordering them can change the results.\ \ http://en.wikipedia.org/wiki/DEFLATE#Duplicate_string_elimination\ \ There's an existing pull request that reduces size by 140 gzipped bytes, however the re-ordering may be too drastic. That said, you can still improve the results by a lesser degree by moving a couple of them around.\ \ https://github.com/jquery/jquery/pull/595

-1, 140bytes is the upper bound? Sounds like a waste of time.

Changed December 13, 2011 04:22PM UTC by jaubourg comment:3

+0, I'd like to see big gains here.

Changed December 13, 2011 05:40PM UTC by dmethvin comment:4

description: By changing the order that the various .js files are included, you can change the eventual gzipped output.\ \ This is due to the way duplicate string elimination works on 32KB boundaries - since the minified source of jQuery will be greater than that, re-ordering them can change the results.\ \ http://en.wikipedia.org/wiki/DEFLATE#Duplicate_string_elimination\ \ There's an existing pull request that reduces size by 140 gzipped bytes, however the re-ordering may be too drastic. That said, you can still improve the results by a lesser degree by moving a couple of them around.\ \ https://github.com/jquery/jquery/pull/595By changing the order that the various .js files are included, you can change the eventual gzipped output. \ \ This is due to the way duplicate string elimination works on 32KB boundaries - since the minified source of jQuery will be greater than that, re-ordering them can change the results. \ \ http://en.wikipedia.org/wiki/DEFLATE#Duplicate_string_elimination \ \ There's an existing pull request that reduces size by 140 gzipped bytes, however the re-ordering may be too drastic. That said, you can still improve the results by a lesser degree by moving a couple of them around. \ \ https://github.com/jquery/jquery/pull/595

-1, Probably not worth the work, but I suspect we'll do a lot of reorg to the build process when Closure Compiler mods arrive.

Changed December 14, 2011 01:28PM UTC by mikesherov comment:5

description: By changing the order that the various .js files are included, you can change the eventual gzipped output. \ \ This is due to the way duplicate string elimination works on 32KB boundaries - since the minified source of jQuery will be greater than that, re-ordering them can change the results. \ \ http://en.wikipedia.org/wiki/DEFLATE#Duplicate_string_elimination \ \ There's an existing pull request that reduces size by 140 gzipped bytes, however the re-ordering may be too drastic. That said, you can still improve the results by a lesser degree by moving a couple of them around. \ \ https://github.com/jquery/jquery/pull/595By changing the order that the various .js files are included, you can change the eventual gzipped output.\ \ This is due to the way duplicate string elimination works on 32KB boundaries - since the minified source of jQuery will be greater than that, re-ordering them can change the results.\ \ http://en.wikipedia.org/wiki/DEFLATE#Duplicate_string_elimination\ \ There's an existing pull request that reduces size by 140 gzipped bytes, however the re-ordering may be too drastic. That said, you can still improve the results by a lesser degree by moving a couple of them around.\ \ https://github.com/jquery/jquery/pull/595

+1, this would require a centralized spot where we define the build order. currently, it's sprinkled around in several locations: the makefile, the unit tests, and soon in the JSHint checker. If the centralization occurs, I see no reason NOT to do this. To put this in context, I spent about 2 hours the other day golfing 40 bytes out of a pull request. 140 bytes is a big win IMO.

Changed December 14, 2011 04:11PM UTC by timmywil comment:6

+0, I'm fine with experimenting.

Changed December 19, 2011 05:34PM UTC by rwaldron comment:7

description: By changing the order that the various .js files are included, you can change the eventual gzipped output.\ \ This is due to the way duplicate string elimination works on 32KB boundaries - since the minified source of jQuery will be greater than that, re-ordering them can change the results.\ \ http://en.wikipedia.org/wiki/DEFLATE#Duplicate_string_elimination\ \ There's an existing pull request that reduces size by 140 gzipped bytes, however the re-ordering may be too drastic. That said, you can still improve the results by a lesser degree by moving a couple of them around.\ \ https://github.com/jquery/jquery/pull/595By changing the order that the various .js files are included, you can change the eventual gzipped output. \ \ This is due to the way duplicate string elimination works on 32KB boundaries - since the minified source of jQuery will be greater than that, re-ordering them can change the results. \ \ http://en.wikipedia.org/wiki/DEFLATE#Duplicate_string_elimination \ \ There's an existing pull request that reduces size by 140 gzipped bytes, however the re-ordering may be too drastic. That said, you can still improve the results by a lesser degree by moving a couple of them around. \ \ https://github.com/jquery/jquery/pull/595

+0

Changed January 18, 2012 03:43AM UTC by dmethvin comment:8

keywords: 1.8-discuss
resolution: → wontfix
status: openclosed