From 5392ff48657e41f45799ae019a4695b3aa24258a Mon Sep 17 00:00:00 2001 From: Dylan William Hardison Date: Thu, 30 Jun 2016 13:47:15 -0400 Subject: 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. --- Bugzilla/Extension.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Bugzilla') 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. -- cgit v1.2.3-24-g4f1b