Ticket #725 (closed enhancement: invalid)

Opened 8 years ago

Last modified 8 years ago

Optimizations for gs_ajax_utils.js

Reported by: zcarter Owned by: nobody
Priority: moderate Milestone: 3.05 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

gs_ajax_utils.diff Download (5.5 KB) - added by zcarter 8 years ago.
.diff file
gs_ajax_utils.js Download (3.3 KB) - added by zcarter 8 years ago.
Hard-copy of new file; I don't trust OS X's diff tool.

Change History

Changed 8 years ago by zcarter

.diff file

Changed 8 years ago by zcarter

Hard-copy of new file; I don't trust OS X's diff tool.

Changed 8 years ago by zcarter

  • status changed from new to closed
  • resolution set to invalid

Sorry for doubling-up on the ticket; I thought it hadn't gone through. See ticket 724. http://trac.greenstone.org/ticket/724

Note: See TracTickets for help on using tickets.