StrataFrame Forum

Typing delays

http://forum.strataframe.net/Topic13899.aspx

By Greg McGuffey - 1/31/2008

I have some users who are reporting extremely slow responses when typing. I.e. when they type, the letters they type do not immediately show up. It is worse when deleting or backspacing. Is there db access when typing into controls, like text boxes? They have a pretty slow connection, which is why I'm wondering about connectivity/db access. This is pretty urgent as I discovered this in a training and they intend to use the system next week.



Thanks!
By StrataFrame Team - 2/1/2008

Well, it could be that the Set of one of the properties on the BO is firing some data access.  It also could be that the way .NET binding works is that it updates all controls every time one of the data values needs to be updated, and we default the DataSourceUpdateMode to OnPropertyChanged.  So, when you type a letter, it fires it back to the data source, which fires the changed event, which causes the binding context on the form to get all of the values for all fields bound on the form. 

So, that might be the cause... I seem to remember that you have some custom properties that execute queries to get their values, and if one or more of those are bound, then they are being retrieved every time a character is entered in a textbox.

You can solve this by either caching off those values that you retrieve, or by changing the DataSourceUpdateMode on your textboxes to OnValidated to cause the queries to be fired only when the textbox data is completely entered and the user clicks/tabs over to the next control.