Skip to content

Commit a362085

Browse files
committed
Optimize imports to reduce the start-up overhead
Signed-off-by: Niels Thykier <[email protected]>
1 parent ec1cb10 commit a362085

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

apt-file

+2-3
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,8 @@ use constant {
3838
use POSIX qw(_exit);
3939
use Getopt::Long qw/:config gnu_getopt no_ignore_case/;
4040
use File::Basename;
41-
use File::Path;
42-
use File::Temp;
4341
use AptPkg::Config '$_config';
44-
use List::MoreUtils qw/any none uniq/;
42+
use List::Util qw/any none uniq/;
4543
use Time::HiRes qw(gettimeofday tv_interval);
4644

4745
my ($Conf, @apt_options);
@@ -774,6 +772,7 @@ sub main {
774772
}
775773
else {
776774
# create tmpfile for zgrep with patterns that have leading slash removed
775+
require File::Temp;
777776
my @zgrep_list = @list;
778777
map { s{^/}{} } @zgrep_list;
779778
my $tmpfile = File::Temp->new();

debian/changelog

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ apt-file (3.2.2) UNRELEASED; urgency=medium
44
under debug mode (despite the intention for it to be
55
disabled as it clashes with the debug messages).
66
* README.md: Update links to Julian's blog. (Closes: #921115)
7+
* Optimize imports to reduce start up time a bit.
78

89
-- Niels Thykier <[email protected]> Sat, 29 Dec 2018 09:42:48 +0000
910

0 commit comments

Comments
 (0)