This patch is missing in action. It was supposed to be applied long time ago but this never happened:
http://lists.samba.org/archive/samba-technical/2007-December/057052.html (with a updated patch)
THe problem is still present.
Have you checked the latest code here in the 3-2-test git branch (what will become 3.2.8) ? The printer location should be queried much less in this branch than the 3.0.x codebase - and very rarely in a loop iterating over all printers.
I'm not convinced this change is needed (and it needs updating for the async printcap query code anyway).
Let me know, if you still think it's a problem I'll update the code for the async case and apply.
Hmm, I probably should write "The patch is still missing" instead of "The problem is still present" because a friend tested 3.2.7 in big setup and according to him the problem looks as fixed.
I think that this bug can be closed for now and if the problem becomes visible again I'll reopen.
Closing out bug report.
Thanks for reporting!