[Patch] Replace template with javascript function to improve page load time
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.
Change History (9)
Description: |
modified (diff)
|
Keywords: |
pull-request added
|
Summary: |
Replace template with javascript function to improve page load time →
[Patch] Replace template with javascript function to improve page load time
|
Cc: |
Steffen Hoffmann added; anonymous removed
|
Owner: |
changed from Rob Guttman to Ryan J Ollos
|
Status: |
new →
accepted
|
Resolution: |
→ fixed
|
Status: |
accepted →
closed
|
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.