Bugzilla::local_timezone should be stored in process_cache instead of request_cache

RESOLVED FIXED in Bugzilla 4.4

Status

()

Bugzilla
Bugzilla-General
--
enhancement
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: Frédéric Buclin, Assigned: Frédéric Buclin)

Tracking

({perf})

Bugzilla 4.4
Bug Flags:
approval +
approval4.4 +

Details

Attachments

(1 attachment)

(Assignee)

Description

5 years ago
Bugzilla::local_timezone calls DateTime::TimeZone->new(name => 'local') which is very slow. It takes 0.2 second on my machine, for each page call. The local timezone won't change while a process is running, and so there is no need for this timezone object to be rebuilt again and again. It should be stored in process_cache instead of request_cache.
(Assignee)

Comment 1

5 years ago
Created attachment 701110 [details] [diff] [review]
patch, v1
Assignee: general → LpSolit
Status: NEW → ASSIGNED
Attachment #701110 - Flags: review?(glob)
(Assignee)

Updated

5 years ago
Keywords: perf
Target Milestone: --- → Bugzilla 4.4
Comment on attachment 701110 [details] [diff] [review]
patch, v1

r=glob
Attachment #701110 - Flags: review?(glob) → review+
Flags: approval?
(Assignee)

Updated

5 years ago
Flags: approval?
Flags: approval4.4+
Flags: approval+
(Assignee)

Comment 3

5 years ago
Committing to: bzr+ssh://lpsolit%40gmail.com@bzr.mozilla.org/bugzilla/trunk/
modified Bugzilla.pm
Committed revision 8556.

Committing to: bzr+ssh://lpsolit%40gmail.com@bzr.mozilla.org/bugzilla/4.4/
modified Bugzilla.pm
Committed revision 8504.
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.