[cups.bugs] [LOW] STR #1283: ProcessBrowseData hugely inefficient

twaugh.redhat twaugh at redhat.com
Thu Sep 29 06:17:11 PDT 2005


[STR New]

While analysing why it is that CUPS cannot scale to 10000 queues, I
discovered that ProcessBrowseData() was a major cause.

In this function, we loop through all the print queues.  For each queue,
we end up calling FindDest() -- which itself loops through all the queues.
 So this is O(N^2).

Commonly, FindDest() is not necessary at all.  Here is a patch to provide
this optimisation.

Link: http://www.cups.org/str.php?L1283
Version: 1.1.23
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: cups-finddest.patch
URL: <http://lists.cups.org/pipermail/cups-devel/attachments/20050929/1589c6b1/attachment.ksh>


More information about the cups-devel mailing list