Bugzilla – Bug 436085
sane-backends install wery expensive not-optimized udev rules
Last modified: 2008-10-22 06:14:37 UTC
The rules in /etc/udev/rules.d/55-libsane.rules are written in a way to cause searches in the entire parent device chain for the files "idVendor" and "idProduct" for _every_ event on the system. This causes a high system load, and delayed bootup, if you have thousends of devices. These attributes exist only at USB devices, and there is no need to search these attributes at every device in the system. Please guard the whole file by SUBSYSTEM=="usb", and skip it, if that is not the case. Also these attributes do not exist at any parent device, and ATTR{} (only the device the event is for) should be used instead of SYSFS{} (search all parents), which would optimize the whole thing dramatically. Thanks!
Same problem with: /etc/udev/rules.d/56-sane-backends-autoconfig.rules
Many thanks for the info! Fixed package sane-backends submitted to FACTORY/STABLE right now.
Created attachment 246837 [details] fixed /etc/udev/rules.d/55-libsane.rules
Created attachment 246838 [details] fixed /etc/udev/rules.d/56-sane-backends-autoconfig.rules
Same for /etc/udev/rules.d/55-hpmud.rules (package hplip). Will fix hplip too...
Fixed package hplip submitted to FACTORY/STABLE right now.
Created attachment 246853 [details] fixed /etc/udev/rules.d/55-hpmud.rules
Should be completely fixed now.
With the current files I get: $ time udevadm test /class/block/sda1 2>/dev/null real 0m0.059s user 0m0.018s sys 0m0.035s After replacing the 3 files with the attached ones I get: $ time udevadm test /class/block/sda1 2>/dev/null real 0m0.037s user 0m0.005s sys 0m0.025s Without the 3 files I get: $ time udevadm test /class/block/sda1 2>/dev/null real 0m0.034s user 0m0.006s sys 0m0.021s Looks good. Very nice! Thanks!
Very many thanks for testing it!