Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CUPS 1.2 startup slower than CUPS 1.1 #1653

Closed
michaelrsweet opened this issue May 3, 2006 · 0 comments
Closed

CUPS 1.2 startup slower than CUPS 1.1 #1653

michaelrsweet opened this issue May 3, 2006 · 0 comments
Milestone

Comments

@michaelrsweet
Copy link
Collaborator

Version: 1.2rc1
CUPS.org User: mike

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant