perhaps take a look at the Command callins
http://springrts.com/wiki/LuaCallinReturn
I don't remember which ones you'll need for a widget looking at queues, but you can test them by using Spring.Echo on their parameters.
instead of iterating through all of the builders and randomly picking which ones to update, you can maintain a list of queued buildings, only updated when a queue changes.
then you only need to draw each building once.
it looks like you iterate through all of the builders on drawworld, so when two builders are building the same queue, you'll draw each item in their queue twice.
nice widget, though :)