[cups.development] why not hash?

Michael Sweet mike at easysw.com
Tue Apr 24 12:52:51 PDT 2007


Hidetomo Katsura wrote:
> fyi, as long as the hash table doesn't noticeably slow down common cases,
> even 1.2x or 1.3x is extremely important to us, efi, with huge PPD files.
> 
> yes, i agree that our next step is to improve ppdConflicts() itself. i'll
> look into it, too. one step at a time.
> 
> and i appreciate it if you consider taking the hash table improvement.

I've updated my hasharray branch to optimize ppdConflicts() itself.

By using a sorted array of constraints and taking advantage of that
we can significantly reduce the execution time (again, for my 21k,
2056c "worst case" PPD file):

     CUPS 1.1.23: 2.346 seconds
     CUPS 1.2.10: 2.659 seconds (0.88x)
     CUPS hasharray: 2.168 seconds (1.08x)
     CUPS 1.2.10 + sorted constraints: 1.051 seconds (2.23x)
     CUPS hasharray + sorted constraints: 0.980 seconds (2.39x)

I'll run more tests with the changes to see how well it performs over
a large set of PPDs...

-- 
______________________________________________________________________
Michael Sweet, Easy Software Products           mike at easysw dot com
Internet Printing and Publishing Software        http://www.easysw.com




More information about the cups mailing list