[cups.bugs] [LOW] STR #1653: CUPS 1.2 startup slower than CUPS 1.1

Michael Sweet mike at easysw.com
Wed May 3 12:22:25 PDT 2006


[STR Closed w/Resolution]

Angel Bugarin reported a performance issue with CUPS 1.2rc1 which seemed to
be a regression from 1.1.x. Basically, with thousands of print queues with
PPD files, it took longer for cupsd to start in 1.2rc1.

The culprit seems to be the printer-specific MIME type lists we now
provide. Basically, the mimeFilter() code did not terminate on the first
matching filter when the cost pointer was NULL.  In addition, it did a
linear lookup on the source type of all filters, which *really* slowed
things down.

The fix is to use another (shadow) array to support O(log N) lookups of
the source type, and to return early if the cost pointer is NULL. This
results in a 10x speedup - 41 seconds down to 4 seconds for 500 printers.

Link: http://www.cups.org/str.php?L1653
Version: 1.2rc1
Fix Version: 1.2-current (r5487)





More information about the cups-devel mailing list