[sane-devel] Sane only available to Super User - Canon FP330P

Matthew Duggan stauff@guarana.org
Tue, 16 Dec 2003 11:36:31 +1100

On Tue, Dec 16, 2003 at 12:59:24AM +0000, Till Kamppeter wrote:
> Matthew Duggan wrote:
> >
> >trying both methods, because depending on your hardware setup, 
> >xsane through saned may be faster than running xsane directly.
> >
> Why is X-Sane through saned faster than direct scanner access with 
> X-Sane? Should I modify scannerdrake (scanner setup tool of Mandrake 
> Linux) so that all scanners get configured via saned?
>    Till


I think this comment only really applies if you have a very slow X server.
I noticed the behaviour myself when I was running an X server on a 
remote machine and xsane was running on the machine with the scanner.  
It appeared to block while rendering the scanned image to the window
(which was a slow operation over a 10MBit network).  I haven't looked 
closely at the xsane code so I'm not sure if it's multithreaded, but 
I assume not.  I noticed that running xsane to saned through loopback 
considerably improved the speed of scanning, because it kept buffering 
and reading as fast as it could while the slow network transfers were

I also gained speed through saned by changing the backend code to always 
read as much as the scanner's internal buffer could hold, then feeding
that data to the frontend as it asked for it.  This reduced the 
number of reads from the parallel port.  With a non-buffering backend, 
saned could actually end up considerably slower because it asks for 
small scan segments at a time.


- Matthew Duggan