Decrease the amount of CSS and JS loaded per page

Bug #622813 reported by Paul Everitt
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
KARL3
Fix Released
Low
Balazs Ree

Bug Description

We currently load TinyMCE, jQuery Tools, and possibly some other libraries on all pages, even if they aren't needed. Even though we don't pay a network retrieval price, we pay an eval price.

Find a way to take some of the <script> and even <link> and load only when needed. Do so on the tinymce branch, but after this week.

Resist the urge to rewrite calendar to not use jQuery Tools. But, find out if anything else uses it besides the calendar, then perhaps only load it on things that use it.

Revision history for this message
Paul Everitt (paul-agendaless) wrote :

Since we'll probably tag today for a production update tomorrow, let's move this to next week to keep the trunk stable.

Changed in karl3:
milestone: m47 → m48
Balazs Ree (ree)
Changed in karl3:
status: New → In Progress
Changed in karl3:
milestone: m48 → m49
Revision history for this message
Balazs Ree (ree) wrote :

This is finished and ready to review:

svn+ssh://<email address hidden>/home/osi/svn/osi-karl3/branches/ree-jsupgrade-3-resources

If someone else looks at this and agrees with me, this can go to trunk and be released at once.

During the work it turned out that there are non-formish forms which needs to be handled separately from the formish ones.
So the target of testing is to have a look: is there any page that is forgotten from the conversions? If yes, then the _only_ risk is that such a page would not load the tinymce editor even if needed. If we discover such an occurrence, it is easy to fix it. There is no other risk involved since the code did not change, only the composition of the resources.

In addition I made a suggestion to Paul to convert the formish.js inclusions to a more reasonable way. This is a very little work and can be done before, of after the merge, it makes no difference.

I did not convert the usage of jquery-tk. The calendar uses the tooltips and scrolling from jquery-tk. This could be converted to using jquery-ui (our default library), but it's currently working good and it's not worth the effort. Similarly, it makes no sense to serve the jquery-tk resources conditionally on the calendar pages only, because the code in question is very small (few K), and a separate resource would cost more then the benefit in this case.

Changed in karl3:
status: In Progress → Fix Committed
Revision history for this message
JimPGlenn (jpglenn09) wrote :

released

Changed in karl3:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.