summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorMartin Whitaker <mageia@martin-whitaker.me.uk>2020-03-20 22:43:48 +0000
committerMartin Whitaker <mageia@martin-whitaker.me.uk>2020-03-21 08:31:13 +0000
commit68c21fe2efabc7310565d1746f2954fa4ea317ad (patch)
treed4d747c6b6ccc40fc7fc5cd40789472275b980d4 /perl-install
parentbdeb0e6c7bad7a6f544692a8778f9102b50caa84 (diff)
downloaddrakx-68c21fe2efabc7310565d1746f2954fa4ea317ad.tar
drakx-68c21fe2efabc7310565d1746f2954fa4ea317ad.tar.gz
drakx-68c21fe2efabc7310565d1746f2954fa4ea317ad.tar.bz2
drakx-68c21fe2efabc7310565d1746f2954fa4ea317ad.tar.xz
drakx-68c21fe2efabc7310565d1746f2954fa4ea317ad.zip
Cache results from detect_devices::getInputDevices().
Significantly speeds up service_harddrake, and hence Live ISO boot, due to many calls to detect_devices::probeall().
Diffstat (limited to 'perl-install')
-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() {