diff options
author | Martin Whitaker <mageia@martin-whitaker.me.uk> | 2020-03-20 22:43:48 +0000 |
---|---|---|
committer | Martin Whitaker <mageia@martin-whitaker.me.uk> | 2020-03-21 08:31:13 +0000 |
commit | 68c21fe2efabc7310565d1746f2954fa4ea317ad (patch) | |
tree | d4d747c6b6ccc40fc7fc5cd40789472275b980d4 /perl-install/detect_devices.pm | |
parent | bdeb0e6c7bad7a6f544692a8778f9102b50caa84 (diff) | |
download | drakx-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/detect_devices.pm')
-rw-r--r-- | perl-install/detect_devices.pm | 4 |
1 files changed, 3 insertions, 1 deletions
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() { |