I just took the first step to really getting to the bottom of making the gtk print dialog work well in the presence of a huge number of printers. There has been some blustering (but strangely no bugs filed) about the print dialog falling flat when there are hundreds of printers in the list. I’m not sure if they are referring to the legacy GNOME print dialog which is known to have those issues or the GTK+ print dialog which really should only be confined by the speed of cups (or papi if you happen to be using that backend). To diagnose what is going on I created a test print backend which simulates a printer network where ppd requests can take an indeterminate amount of time to be transferred to the local machine. Other enhancements will include printers popping on and off the network at random times.

Printers fetching PPDs

Using the test backend I played around with adding feedback to the icons in the dialog. Ignore the trash cans as I am just using them for the default printer icon to distinguish them from regular printers. The refresh icon shows a details (ppd) request in progress. Hopefully we can get an animated icon for that. The X icons show fetches that have failed. That patch is not quite done yet but it does illustrate how user feedback can make the experience a lot better. Right now if the fetch fails all you get is a grayed out print button.

The other thing I found while playing with the dialog and the 100 printers is that our search is dismal. Say I want to find printer 99. Typing in 99 does not find all of the printers with 99 in their name. Instead it is only searching for printers who’s name starts with 99. I’m not typing in “Print to Test Printer 99″ just to find printer 99. There are two things we can do here. Either make the search function more robust so it searches inside the text or override search so it acts as a filter blocking out all printers without 99 in their names. I like the latter but it does bring up some issues of needing to pop up a filter bar so one could revert to the normal view. I dislike having a filter bar visible at all times. The advantage of the filter however is that the list will not jump around as much when items are added or removed from the list.

The second usability improvement I want to make is to add a recently used printer list similar to the bookmark list in the file dialog. Only printers which have been seen will show up on the list ordered by last use. These printers will request their details in small batches when the dialog is opened as opposed to waiting for the user to click on them. The idea is one usually only uses a handful of printers even if there are hundreds available. We should therefore get those ready the fastest and only show a few of them. The cool thing about this is if you only have one printer at home, when you get there that is the only one you will see and then when you get to work the two printers you always use which are buried way down the list will now be readily available.

These improvements won’t solve every problem. There is still the issue of going into a fresh network and having to wait for printer lists to propagate. Improvements to cups could alleviate that by allowing clients to only have to speak to one server. I’m not sure if it is a configuration issue or just hasn’t been implemented issue but it is kind of a fun test to restart cups and watch as printers slowly trickle in as they are discovered. There are also some issues in the cups backend that can use some love.

Please file bugs and submit patches. I don’t have as much time to work on printing since printing is cost prohibitive and not a high priority for my current target audience. Feel free to ask question on how to get started hacking on Gtk and GtkPrint.  It would make a great SOC project.

[read this post in: ar de es fr it ja ko pt ru zh-CN ]