Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6896515
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T07:03:12+00:00 2026-05-27T07:03:12+00:00

I read that concatenating and possibly gzipping a javascript file will make an application

  • 0

I read that concatenating and possibly gzipping a javascript file will make an application run faster, so I decided to give it a go.

I figured most of my pages (although not all) were downloading at least 1mb of javascript, so why not compress and aggregate it?

Well, it turns out I think the performance is worse than before. Firebug is reporting that the “DomContentLoaded” took 1.17s on any random page for the application. Is this at normal? Like whoa.

Basically my application javascript now aggregates all of the files for the site. Each file looks for a main id, and if it’s there, it runs some code. If not, it just goes the next function block.

I have put in a bunch of libraries along with my application code as well. Here are the libraries I’m using. Should I have aggregated these, or no?

<include>**/font/font.js</include>
<include>**/json/json2.js</include>
<include>**/jwplayer/jwplayer.js</include>
<include>**/underscore/underscore.js</include>
<include>**/jquery/jquery-1.7.1.js</include>
<include>**/jquery/jquery-ui-1.8.16.custom.min.js</include>
<include>**/jquery/jquery.cookie.js</include>
<include>**/jquery/jquery.jcrop.js</include>
<include>**/jquery/jquery.tmpl.js</include>
<include>**/jquery/farbtastic.js</include>
<include>**/simpleyui/simpleyui.js</include>
<include>**/audio-player/audio-player.js</include>
<include>**/tiny_mce/tiny_mce.js</include>
<include>**/jscharts/jscharts.js</include>

I think my big footprint is in jquery-1.7.1.js (100k), jquery-ui-1.8.16.custom.min.js (206k), jwplayer.js (83k), simpleyui.js (103k), jscharts.js (100k) and tiny_mce.js (186k). Those kb amounts are minified surprisingly.

I’ve experimented with gzipping the content on demand, but this actually makes it slower. I guess rackspace cloud’s cpus are not very fast? It adds a lot of time to the request. Turning off gzipping on demand seems to make things better.

EDIT: I can confirm that putting the javascript at the bottom of the page makes no difference. I can confirm that removing all of the libraries like jquery, audio-player, jwplayer, etc. takes a total of 1 seconds just by itself.

My application code (which is a lot more files, but less code overall probably) takes about .2 to .3 seconds.

I am 99% sure the problem has nothing to do with downloading now and a lot more to do with execution speed.

What would you recommend I do to improve the performance of my pages?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T07:03:13+00:00Added an answer on May 27, 2026 at 7:03 am

    You can load only the javascript libraries you need on each page.

    In my current project we are working on reducing reliance on outside javascritpt library dependencies by encapsulating components of functionality and passing them through a dependency manager that loads only the javascript libraries that are needed for each particular page (if a page has 3 modules then it only loads the libraries needed for those).

    You can use this approach to get rid of a lot of needless requests for particular libraries.

    Reduce reliance on outside libraries as much as possible.

    In addition, we’ve taken measures to reduce reliance even on jQuery by converting our code to use DOM directly instead, for example by using document.getElementByID() and getElementsByTagName() instead of jQuery('#myId') or jQuery('table.myTableClass'). This has helped cut down some pages so that they use no dependencies at all, hence giving an incredible boost to their loading time.

    Another example is that if you only need CSS selectors instead of the whole gamut of jQuery functionality you can use Sizzle which is the standalone CSS selector engine, thus cutting your 80+ KB of jQuery into only 4KB needed for Sizzle. I’m sure the same approach can be used with your other libraries to trim down a lot of unnecessary flab in your application.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I read that it's possible to make quicksort run at O(nlogn) the algorithm says
I read that you could call JavaScript code from a Java Applet by calling
I read that you should define your JavaScript functions in the <head> tag, but
I read that int c; while(c = getchar() != EOF) { putchar(c); } will
I read that Domain Driven Design is about concentrating on the problem domain instead
I read that SQL exceptions are treated as normal exceptions in managed SPs; I
I read that defined styles are located at C:\Program Files\Microsoft Office\Office12\Bibliography\Style I use ISO
I read that some webmail services prefetch url links in emails. The GET request
I read that .NET uses connection pooling. For example, if I instantiate a bunch
I read that when you don't have access to the web server's headers you

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.