[sane-devel] [ANN] Plustek Backend update V0.45-1

Henning Meier-Geinitz henning@meier-geinitz.de
Sun, 12 Jan 2003 15:39:01 +0100


Hi,

On Sat, Jan 11, 2003 at 07:12:39PM +0100, Till Kamppeter wrote:
> I have tested your update with my Epson Perfection 1260 Photo (it 
> survived the driver version shipped with SANE 1.0.9 without needing to 
> turn it off) and it works well. Only problem is the model 
> auto-detection. It is way too slow.

If you use the kernel scanner driver, that one is at fault. That's
fixed in Linux 2.4.21-pre3. The problem is the message about the wrong
minor number pronted to syslog over and over again.

> I have a tip to make it faster:
 
> When you run "sane-find-scanner", it needs about a second after failing 
> with the SCSI search to find the scanner's USB ID's.

sane-find-scanner checks all device file in /dev/usb/scanner* once and
tries to find out it's vendor and product ids. Even this is slow with
the old kernel driver.

The backends ask sanei_usb for all devices that match a give vendor
and product id so for each of these requests the function to scan
/dev/usb/scanner* is called. This can take quite a lot of time because
it 's done for every supported scanner. But essentially, it's the same
routine as in sane-find-scanner.

The more devices in /dev/usb/scanner? (and /dev/usbscanner*) you have,
the longer this can take. That may explain the difference between your
and Gerhard's setup.

I don't think there is a fix in SANE that can change this until the
new kernel scanner driver is installed everywhere. It's also not
specific to the plustek backend, because most of the USB backends work
this way. The more scanners they support, the longer the scan takes.

Example (SANE from CVS):
2.4.21-pre1: time scanimage -L
real	     1m24.844s
user	     0m0.040s
sys	     1m21.080s

2.4.21-pre3: time scanimage -L
real	     0m0.104s
user	     0m0.020s
sys	     0m0.060s

To make the scan faster if a new kernel shouldn't be used and the
driver shouldn't be back-ported, there may be some work-arounds:

- don't create too much /dev/usb/scanner* devices if you don't need them
- disable other USB backends in dll.conf
- use only libusb, not the scanner driver

bye,
  Henning