Closed
Bug 174524
Opened 23 years ago
Closed 23 years ago
Tidy up Bugzilla::{Util,Config}, and lazily-load unneeded modules
Categories
(Bugzilla :: Bugzilla-General, defect, P1)
Tracking
()
RESOLVED
FIXED
Bugzilla 2.18
People
(Reporter: bbaetz, Assigned: bbaetz)
Details
(Keywords: perf)
Attachments
(1 file, 1 obsolete file)
|
14.01 KB,
patch
|
bugreport
:
review+
|
Details | Diff | Splinter Review |
I'll attach a patch which does two things:
a) Move the POD to under an __END__ line. This allows the perl parser to avoid
having to skip over all the POD, since it stops as soon as it gets to the
__END__ line. The perf improvment of this was not measurable on my unloaded
PIII-500.
b) load Data::Dumper and File::Temp only when required. This speeds up loading
Bugzilla::Config quite a bit, especially when combined with
http://www.template-toolkit.org/pipermail/templates/2002-October/003790.html,
which does the same thing to TT. (myk, you may want to apply that locally to bmo
when you upgrade TT).
With both these changes (incl the TT patch), |time perl -w -e 'use
Bugzilla::Config'| goes from 0.54s to 0.20s, roughly. I can save about another
0.04s by removing the |use Safe| thing I added, and the rest is just generic
noise, according to dprof.
| Assignee | ||
Comment 1•23 years ago
|
||
| Assignee | ||
Updated•23 years ago
|
| Assignee | ||
Comment 2•23 years ago
|
||
This is needed to get the speed increase on a real script (Except once every
hour, of course)
Attachment #102914 -
Attachment is obsolete: true
Comment 3•23 years ago
|
||
Comment on attachment 102916 [details] [diff] [review]
s/use/require/ in globals.pl, too
With the change to use....
{
local $Data::Dumper::Sortkeys;
local $Data::Dumper::Terse;
local $Data::Dumper::Indent;
}
In Config.pm...
r=joel
Attachment #102916 -
Flags: review+
| Assignee | ||
Comment 4•23 years ago
|
||
Checked in, with that change (needed because perl 5.6 doens't like the use vars
trick I had to pull, probably correctly)
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Updated•12 years ago
|
QA Contact: matty_is_a_geek → default-qa
You need to log in
before you can comment on or make changes to this bug.
Description
•