lpstat -s is going to gather status information for each print queue
from each of the print servers. Since the name service maps on the SWAN
contain 3500+ print queue entries, this takes a very long time.
Applications wishing to enumerate a list of printers should either use
papiPrintersList() and limit the requested attributes to "printer-name"
and possibly "printer-uri-supported", use "lpstat -v" or "lpget list".
Either of the latter commands will only contact the name service for the
list of configured print queues.
An example piece of code that does this using papiPrinterList() can be
found at
http://src.opensolaris.org/source/xref/loficc/crypto/usr/src/cmd/print/bsd-sysv-commands/common.c#404
-Norm
Mike Kupfer wrote:
> People running StarOffice 8 inside Sun are getting hangs when they first
> open a file. We've tracked this down to the printer enumeration that
> StarOffice is doing. ptree shows it first doing "lpstat -s", then "lpc
> status" (I assume "lpc status all").
>
> I timed these two operations on my desktop system (without StarOffice).
> "lpstat -s" takes about half a minute. "lpc status all" takes 1 hour
> and 40 minutes.
>
> So, two questions for the printer experts:
>
> 1. Even allowing for the huge printers map inside Sun, an hour and 40
> minutes seems excessive. Is there any chance that lpc's performance
> will be improved?
>
> 2. Does it make any sense for StarOffice to do both "lpstat -s" and "lpc
> status all"? Shouldn't it be enough to do just "lpstat -s"?
>
> If anyone is interested, the CR number is 6506846.
>
> thanks,
> mike
> _______________________________________________
> printing-discuss mailing list
> printing-discuss at opensolaris.org
>