Hi
I been
testing my site and the page where most of the action on my site is slow. I tried using sloppy and set it at 56k speed and to load up the page it took about 100seconds to load up.
So I think even for a 56k that is way to slow.
Now I think the reason why it is slow is because this page has lots going. Since it has 3 tabs that probably in the old days would represent 3 different page. Now in this page I have lots of jquery going on. Like I have many plugins plus their style sheets then my own written jquery javascript files.
So when all is said and done. I have like 700kb worth of jquery javascript files and probably like a 100-200(probably more like 150kb) of CSS files/little images the plugins use. This is just a rough rough estimate since I have some files in that directory that I don't actually use and are not being loaded up.
So I think it is this sheer amount of files that is slowing it down. Like after it is cached the page will load up on a 56k in like 11seconds.
So I am not really sure what to do.
I pretty much need all the plugins and most of them are pretty small like 8kb. the big daddy of them all is the UI datepicker and that is like 70kb and that is pretty much the most important plugin I have. I moved the actually jquery(jquery-1.3.2.min.js) to the master page so when they load up the home page that will be cached right away. I don't really want to do that on the other ones since well then I will just make the home page load up slower.
The home page seems to load up in about 1 to 1.5 seconds but sometimes it takes like 5 seconds to load up and I think that might be something to do with my hosting company.
I was thinking about making each tab have an ajax request to load up the stuff but there are not that many controls on each tab(most stuff grows dynamically as the user adds in information what is already ajax). So I don't think that it will give me any sort of speed game and will cause more trouble.
The only thing I can think of is try to identify the plugins and try to load them up when that tab loads up. I am not sure how to do this one and then at the same time I am not sure how much this will help. Like for instance 2 of the tabs use the datepicker and one of the tabs is the one that is open by default. So that would need to be loaded up on start.
So I am not sure how to solve my problem, how to really identify if this is truly the cause of my slow loading and I am thankful for the caching but how long does that stay with the user until it gets deleted?
I used as many mini versions of the plugins and files as I could find. Also does putting everything in one file make it faster? I am pretty sure I could not merge all the plugins into one file but I could probably merge my 3 javascript files into one file. I just put them in 3 different files since it was just easier to figure out what belong to what.
Thanks