Closed Bug 1251208 Opened 9 years ago Closed 9 years ago

Bugzilla->request_cache() can be faster

Categories

(Bugzilla :: Bugzilla-General, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 6.0

People

(Reporter: dylan, Assigned: dylan)

References

Details

(Keywords: perf)

Attachments

(1 file, 1 obsolete file)

Using $r->pnotes for the request cache requires two method calls and multiple lookups to a package variable. Experiments while poking at Bug 1251047 show request_cache over 7678 calls going from 326ms to 12.9ms
See Also: → 1251047
Attached patch 1251208_1.patch (obsolete) — Splinter Review
See Comment #0 for more reasonings.
Attachment #8723525 - Flags: review?(dkl)
Comment on attachment 8723525 [details] [diff] [review] 1251208_1.patch Review of attachment 8723525 [details] [diff] [review]: ----------------------------------------------------------------- r=dkl
Attachment #8723525 - Flags: review?(dkl) → review+
To ssh://gitolite3@git.mozilla.org/bugzilla/bugzilla.git 9343e3a..438d57d master -> master
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → Bugzilla 6.0
Blocks: 1255835
Patch backed out. If you have an extension enabled, checksetup.pl never ends, and localconfig is deleted and replaced by the default one, see bug 1255835. To ssh://gitolite3@git.mozilla.org/bugzilla/bugzilla.git 777c785..53d6ba4 master -> master
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Attached patch 1251208_2.patchSplinter Review
So under a large number of circumstances, for a long time, Bugzilla::Install::Util::_cache and Bugzilla->request_cache have been the same thing. This patch preserves that relationship. Hopefully better than the previous patch, this patch fixes the following problems: 1) pnotes() is slow 2) clear_request_cache assigns a new hash to request_cache, so the previous one (under non-mod-perl) stayed around forever. Here (as in the original patch) we clear the hash properly. 3) non-lexical variables are not needed in module, and my() variables are (slightly) faster. What is still ugly -- but required to prevent bug 1255835 -- is that the Install::Util cache and the request cache stay the same.
Attachment #8723525 - Attachment is obsolete: true
Attachment #8729632 - Flags: review?(LpSolit)
Attachment #8729632 - Flags: review?(LpSolit) → review?(dkl)
Comment on attachment 8729632 [details] [diff] [review] 1251208_2.patch Review of attachment 8729632 [details] [diff] [review]: ----------------------------------------------------------------- r=dkl
Attachment #8729632 - Flags: review?(dkl) → review+
To ssh://gitolite3@git.mozilla.org/bugzilla/bugzilla.git 0cac98d..da0347e master -> master
Status: REOPENED → RESOLVED
Closed: 9 years ago9 years ago
Resolution: --- → FIXED
Blocks: 1262949
Keywords: perf
Blocks: 1302755
Blocks: 1319503
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: