I am implementing a chat client in an application. Conversation windows are tabbed and I have to alert the user for new messages. My temporary solution was like this:
There is a timer with 500ms interval ( always running ).
For Each t In SuperTabControl3.Tabs
If TypeOf t Is SuperTabItem Then
If t.Tag = "1" Then
If t.PredefinedColor = eTabItemColor.Default Then
t.PredefinedColor = eTabItemColor.Lemon
Else
t.PredefinedColor = eTabItemColor.Default
End If
End If
End If
Next
Will this cause performance issues? I have no possibility to try on an older computer but they will use this application on slow pc’s.
Anyone have an idea how to do that kind of notification?
Gut feel is that won’t cause performance problems at all. 500ms is a really really long time in processing terms for most “modern” computers (at least 5-6 yrs old).
Also that loop is not doing any expensive calculations and unless its iterating thousands of tabs you probably even wont be able to notice it run. (I doubt most humans could monitor thousands of chats 🙂 )
Changing the colour of elements should also not be expensive (performance-wise) leave that to the .NET framework to worry about (trust your tools).