Without actually seeing your code, I cannot make a solid recommendation.
However, In the past I was informed by Philips that the GUI.widget() lookup time should not be linear based on number of widgets on the page as I presume they use some sort of hashtable to do lookup.