lpq has bad performance

Michael Sweet mike at easysw.com
Wed Aug 11 05:21:20 PDT 2004


sven.loth at 1und1.com wrote:
> Update:
> 
> I did some tests with 100 printjobs.
> 
> an "lpq -a" command takes more than 11 seconds !!!! to return.
> 
> real    0m11.011s
> user    0m0.023s
> sys     0m0.067s
> 
> 
> The stacktrace of "lpq -a" shows that the time() function is every second command called by lpq.
> 
> Example:
> ...
> Is that a bug or a feature ;-) ?

It is probably updating the activity field of the http_t structure
after every read, which is a feature.  I don't think that the time()
calls would cause that much overhead, however you can test for this
easily enough by commenting out the call in httpRead().  If it makes
a big difference, then we can move this to the scheduler where the
activity timer is used to implement timeouts (and we can call it once
per select() there...)

If commenting out the time() call makes a big difference for you, please
file this as a STR at:

     http://www.cups.org/str.php

and we'll make sure this is updated in 1.1.21.

-- 
______________________________________________________________________
Michael Sweet, Easy Software Products           mike at easysw dot com
Printing Software for UNIX                       http://www.easysw.com




More information about the cups mailing list