I hope this comes in handy. I've looked at the source and found a small change that could spare a couple of CPU cycles....
Suggested change to Core\guilib\GUIWindow.cs
Should help generel GUI rendering since no new object is assigned and transferred.
It's just a simple property-lookup. As far as i can tell (and test) the code performs the exact same functionality only slightly faster...
The best solution (if possible at all) would be to get rid of the for loop. But I think only Frodo can anwser if that is even possible.
;-) Ojo
Suggested change to Core\guilib\GUIWindow.cs
Code:
public virtual GUIControl GetControl(int iControlId)
{
for (int x = 0; x < m_vecControls.Count; ++x)
{
GUIControl cntl = (GUIControl)m_vecControls[x];
// old code
// GUIControl cntlFound = cntl.GetControlById( iControlId );
// if (cntlFound!=null) return cntlFound;
// new code
if (iControlId == cntl.GetID) return cntl;
}
return null;
}
Should help generel GUI rendering since no new object is assigned and transferred.
It's just a simple property-lookup. As far as i can tell (and test) the code performs the exact same functionality only slightly faster...
The best solution (if possible at all) would be to get rid of the for loop. But I think only Frodo can anwser if that is even possible.
;-) Ojo