Ticket #9764 (new enhancement)

Opened 1 year ago

Last modified 10 months ago

[Patch] Replace template with javascript function to improve page load time

Reported by: rjollos Assigned to: robguttman
Priority: normal Component: QuietPlugin
Severity: normal Keywords: pull-request
Cc: hasienda Trac Release: 0.11

Description (Last modified by rjollos)

I've done some work over in #7617 with help from hasienda to improve the page load times when using the DateFieldPlugin. We replaced a virtual script (template) with a script and used add_script_data that is available now in Trac 0.12 to pass data to the script. The result is (and I barely know what I'm talking about here), the js file is under chrome and is treated as a cacheable static resource, resulting in improved page load times. I put a lot of info in #7617, documenting the improvements that I saw.

I'm thinking the same is probably possible here. By replacing the quiet.html with quiet.js and adding using add_script, it will get located under chrome and cached in the browser.

Attachments

QuietPlugin.png (42.9 kB) - added by rjollos on 02/05/12 08:50:55.
QuietFromCache.png (19.4 kB) - added by anonymous on 03/02/12 08:39:11.

Change History

02/05/12 08:50:55 changed by rjollos

  • attachment QuietPlugin.png added.

03/02/12 08:19:30 changed by rjollos

  • keywords set to pull-request.
  • description changed.
  • summary changed from Replace template with javascript function to improve page load time to [Patch] Replace template with javascript function to improve page load time.

03/02/12 08:39:11 changed by anonymous

  • attachment QuietFromCache.png added.

03/02/12 08:43:40 changed by rjollos

  • cc set to hasienda.

I've created a patch and pushed it to my development fork on BitBucket: 610ad703cf2f. I'm not an expert at interpreting the profiling results that I posted, but it seems like this change has improved page load times since the JS is cached and we've removed the template that seems to be loaded every time.

03/02/12 08:58:19 changed by rjollos

If you apply the patch, make sure to clear your browser cache to prior to doing any testing.

07/25/12 09:48:19 changed by rjollos

I've been running this patch now for 5 months with now issues, with the exception of #9748, which existed prior to the patch.


Add/Change #9764 ([Patch] Replace template with javascript function to improve page load time)




Change Properties
Action