summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--perl-install/NEWS3
-rw-r--r--perl-install/detect_devices.pm4
2 files changed, 6 insertions, 1 deletions
diff --git a/perl-install/NEWS b/perl-install/NEWS
index 148e26ee0..e54eea86d 100644
--- a/perl-install/NEWS
+++ b/perl-install/NEWS
@@ -1,3 +1,6 @@
+- cache results from detect_devices::getInputDevices()
+ (significantly speeds up service_harddrake, and hence Live ISO boot)
+
Version 18.26 - 20 March 2020
- diskdrake:
diff --git a/perl-install/detect_devices.pm b/perl-install/detect_devices.pm
index 924f88325..15201a057 100644
--- a/perl-install/detect_devices.pm
+++ b/perl-install/detect_devices.pm
@@ -545,6 +545,8 @@ sub isTVcardConfigurable { member($_[0]{driver}, qw(bttv cx88 saa7134)) }
sub getTVcards() { probe_category('multimedia/tv') }
sub getInputDevices() {
+ state @input_devices;
+ return @input_devices if @input_devices;
my (@devices, $device);
my $event;
foreach (cat_('/proc/bus/input/devices')) {
@@ -655,7 +657,7 @@ sub getInputDevices() {
undef $device;
}
}
- @devices;
+ @input_devices = @devices;
}
sub getInputDevices_and_usb() {