.js files are a huge drain

16 years 4 months ago #52963 by mpatta
.js files are a huge drain was created by mpatta
I was trying to see why the register users page takes so long to render (almost 15 seconds on a fast connection). When i ran websiteoptimization.com on the register page, i was shocked to see about 150k+ bytes of .js files alone. My average page is just about 20k in total

This is the size and name of each script that was downloaded for the page:
51562 /components/com_comprofiler/js/calendar.js
36394 /components/com_comprofiler/js/overlib_mini.js
16330 /includes/js/mambojavascript.js
12359 /components/com_comprofiler/js/cb.js
11828 /components/com_comprofiler/js/tabpane.js
9054 /components/com_comprofiler/js/calendar-setup.js
6350 /components/com_comprofiler/js/overlib_anchor_mini.js
3658 /components/com_comprofiler/plugin/language/default_language/calendar-locals.js
3352 /components/com_comprofiler/js/overlib_hideform_mini.js
2326 /components/com_comprofiler/js/overlib_centerpopup_mini.js

i can't even find the files that reference these .js by doing an fgrep, so the next best thing i am going to do is just to zero out these .js and test all my pages until i break something.

The best part is that i don't even need a calendar control on my site.

Anyone who can help me understand which ones are needed, and which ones are not?

Once i figure this out, i shall also try and provide this information back, and hopefully this can be cleaned up.

Please Log in to join the conversation.

16 years 4 months ago #52980 by beat
Replied by beat on topic Re:.js files are a huge drain
Thanks for pointing at this. Things tend to sum up indeed... :S

I marked this thread for solving in next release. Idea is to output JS only if needed, and to output it compressed when not in debug mode.

Inputs/Contributions are of course welcome. Will visit this thread again when we come to this.

In the mean time, you would win probably 60+% bandwidth and speed in those pages by just turning on gzip output compression in your web-server settings, so that the js files get compressed too.

Beat - Community Builder Team Member

Before posting on forums: Read FAQ thoroughly -- Help us spend more time coding by helping others in this forum, many thanks :)
CB links: Our membership - CBSubs - Templates - Hosting - Forge - Send me a Private Message (PM) only for private/confidential info

Please Log in to join the conversation.

16 years 3 months ago #54665 by beat
Replied by beat on topic Re:.js files are a huge drain
Did the largest one for upcoming CB 1.2: calendar.js will not come when there is no calendar fields to display, AND you have enabled the xhtml compliance of the profiles (in CB general config - profiles ).

Beat - Community Builder Team Member

Before posting on forums: Read FAQ thoroughly -- Help us spend more time coding by helping others in this forum, many thanks :)
CB links: Our membership - CBSubs - Templates - Hosting - Forge - Send me a Private Message (PM) only for private/confidential info

Please Log in to join the conversation.

15 years 6 months ago #77726 by moseleysc
Replied by moseleysc on topic Re:.js files are a huge drain
Hi Beat,

I'm having similar problems - is there a single file where most of these javascript files are output? Although it takes more maintenance, for smaller modules and plugins, I'm trying to combine and compress css and js files.

Since there are a lot of files for CB, I'd love to do the same, but only if there is a central location where most are called from.

Also, a couple of the files are already loaded (I have jquery loaded on my site already). I can't find the file where these are called... Help?

Thanks.

Steve

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.186 seconds

Facebook Twitter LinkedIn