Opened 13 years ago

Closed 13 years ago

Last modified 12 years ago

#2196 closed enhancement (fixed)

Intern strings by looking for dojo.uri.Uri/moduleUri calls instead of templatePath/templateCssPath

Reported by: James Burke Owned by: James Burke
Priority: high Milestone:
Component: BuildSystem Version: 0.4.1
Keywords: Cc:
Blocked By: Blocking:

Description

Right now string interning does not work well for all widgets, because some widgets use other widget properties besides templatePath/templateCssPath to store the template URIs (Editor2 in particular).

So, look for dojo.uri calls instead, and if the file extension is .html, .htm, .txt or .css, then make a modified dojo.uri call that also includes the content of the URI as part of the dojo.uri call.

Then, in DomWidget?, look for this special property on the dojo.uri.Uri object (call it cachedContent for now), and if it is there, use it instead of trying to do a network request for the content.

Attachments (3)

2196.patch (13.5 KB) - added by James Burke 13 years ago.
2196 patch (excludes internStrings.js and dojo.uri.cache)
internStrings.js (5.9 KB) - added by James Burke 13 years ago.
cache.js (813 bytes) - added by James Burke 13 years ago.

Download all attachments as: .zip

Change History (7)

Changed 13 years ago by James Burke

Attachment: 2196.patch added

2196 patch (excludes internStrings.js and dojo.uri.cache)

Changed 13 years ago by James Burke

Attachment: internStrings.js added

Changed 13 years ago by James Burke

Attachment: cache.js added

comment:1 Changed 13 years ago by James Burke

Resolution: fixed
Status: newclosed

(In [6929]) Fixes #2196: now have a intern-strings option for things that do not use templatePath and templateCssPath. Also moved intern-strings from python into javascript

comment:2 Changed 12 years ago by James Burke

(In [7046]) References #2196: now have a intern-strings option for things that do not use templatePath and templateCssPath. Also moved intern-strings from python into javascript (merge from trunk)

comment:3 Changed 12 years ago by James Burke

Milestone: 0.90.4.2

Merged into 0.4 branch for 0.4.2.

comment:4 Changed 12 years ago by (none)

Milestone: 0.4.2

Milestone 0.4.2 deleted

Note: See TracTickets for help on using tickets.