[cups.bugs] [MOD] STR #1201: Implicit class handling *very* slow

twaugh.redhat twaugh at redhat.com
Thu Jun 16 06:19:26 PDT 2005


[STR New]

When two CUPS servers are set up with several hundred queues each, both
servers having identically-named queues, the result is that several
hundred implicit classes are created.

When one server goes down for whatever reason, CUPS schedulers on the
client machines can take *minutes* to adjust the classes, after the
BrowseTimeout is reached.  Minutes of CPU time!

Attached is a patch to address this.  The patch does two things, both in
DeletePrinterFromClass():

1. If the class contains the printer, it is removed by moving the later
members of the printers array on top of the found entry.  Since the source
and destination addresses will overlap when there is more than one entry
to move, memmove() must be used instead of memcpy().  This is not related
to the inefficiency problem, but is a bug that should be corrected.

2. Having determined whether or not the printer to be removed was in the
class, c->type is recalculated.  However, there is no need to do this (or
call SetPrinterAttrs(), which is a lengthy operation) when the printer was
not in the class.

(my ref: 160620)

Link: http://www.cups.org/str.php?L1201
Version: 1.1.23
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: cups-slow.patch
URL: <https://lists.cups.org/pipermail/cups/attachments/20050616/84323bd2/attachment.ksh>


More information about the cups mailing list