summaryrefslogtreecommitdiffstats
path: root/Bugzilla
diff options
context:
space:
mode:
authorDylan William Hardison <dylan@hardison.net>2016-06-30 19:47:15 +0200
committerDylan William Hardison <dylan@hardison.net>2016-06-30 22:49:31 +0200
commit5392ff48657e41f45799ae019a4695b3aa24258a (patch)
treead0658f0bb3811afe44d5f89734eeb1d36853791 /Bugzilla
parent4a1c756ef3d7d06962b6c39a4ea78c1ca9a0c407 (diff)
downloadbugzilla-5392ff48657e41f45799ae019a4695b3aa24258a.tar.gz
bugzilla-5392ff48657e41f45799ae019a4695b3aa24258a.tar.xz
Bug 1283612 - Add Bugzilla::Extension module loader last
Currently, anything that is loaded after the bugzilla extensions are loaded has to search through each callback inserted into @INC by Bugzilla::Extension. If you have a lot of extensions this is slow. It is harmless to search for Bugzilla::Extension::* modules last, so we replace the unshift with a push.
Diffstat (limited to 'Bugzilla')
-rw-r--r--Bugzilla/Extension.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/Bugzilla/Extension.pm b/Bugzilla/Extension.pm
index fcd41ae86..eb17b9f1a 100644
--- a/Bugzilla/Extension.pm
+++ b/Bugzilla/Extension.pm
@@ -143,7 +143,7 @@ sub modify_inc {
# directory. We don't want Bugzilla's base lib/CGI.pm being loaded as
# Bugzilla::Extension::Foo::CGI or any other confusing thing like that.
return if $package_dir eq bz_locations->{'extensionsdir'};
- unshift(@INC, sub { __do_call($class, 'my_inc', @_) });
+ push(@INC, sub { __do_call($class, 'my_inc', @_) });
}
# This is what gets put into @INC by modify_inc.