#10125 closed defect (bug) (fixed)
Code optimisations for timezone dropdown builder.
Reported by: | sambauers | Owned by: | |
---|---|---|---|
Milestone: | 2.8.1 | Priority: | high |
Severity: | normal | Version: | 2.8 |
Component: | Date/Time | Keywords: | timezones, has-patch |
Focuses: | Cc: |
Description
The new timezone dropdown builds noticeably slowly in 2.8 causing lag when opening the general options page in admin.
The main problem was with inefficient use of translate functions within the usort callback.
Secondarily, the loop which builds the actual options html was using a string concatenation method which pulls and pushes the same variable in and out of memory hundreds of times.
The following patch fixes both of these problems and generally tidies things up. Performance is improved noticeably.
Attachments (2)
Change History (9)
#3
in reply to:
↑ 2
@
15 years ago
Replying to ryan:
Haven't looked the whole patch over yet, but __() can accept only literal strings. translate() should be used if passing a variable or function return.
I'll fix this and resubmit the patch.
Note: See
TracTickets for help on using
tickets.
Haven't looked the whole patch over yet, but __() can accept only literal strings. translate() should be used if passing a variable or function return.