Opened 13 years ago
Last modified 3 years ago
#724 new enhancement
Optimizations for gs_ajax_utils.js
Reported by: | zcarter | Owned by: | zcarter |
---|---|---|---|
Priority: | moderate | Milestone: | 3.11 Release |
Component: | Greenstone3 Runtime | Severity: | enhancement |
Keywords: | greenstone3, web, javascript, optimize | Cc: |
Description
I am unable to email these changes as I am at school, and I don't have Subversion write access (and the school computers don't have SVN anyway).
The changes are:
- Changed multiple concatenations into creation of lists (they are joined when returned). This is faster as in Javascript, strings are immutable.
- Changed postfix increments to prefix increments where possible; slight performance boost.
- Changed multi-line functions into one-liners where possible (avoids variable allocation, etc.)
- Fixed inconsistencies in coding style (all four-spaces instead of mixed, whitespace added, etc.)
- Removed unneeded whitespace.
Included is a diff file, and the actual file itself.
Attachments (2)
Change History (6)
comment:1 by , 13 years ago
Owner: | changed from | to
---|
by , 13 years ago
Attachment: | gs_ajax_utils.js added |
---|
comment:2 by , 13 years ago
Updated gs_ajax_utils.js again; coding inconsistency with an if statement and added a join() call to newOpenTag.
comment:3 by , 13 years ago
Milestone: | 3.05 Release → 3.06 Release |
---|
Several optimizations have been made but as this is only used in one minor feature we will move this back to the 3.06 release.
comment:4 by , 3 years ago
Milestone: | 3.10 Release → 3.11 Release |
---|
Ticket retargeted after milestone closed
Note:
See TracTickets
for help on using tickets.
Fixed newOpenTag. Fixed a coding style inconsistency.