Thin Client trap for young players
Posted: Fri Aug 07, 2009 11:28 am
by CarlRanson >> Mon, 6 Jan 2003 5:40:12 GMT
Discovered an issue with Jade thin client today that might be relevant to some of you.
We have a control that makes some subbordinate controls at run time (eg, in windowCreated). As part of the process it sets the tab order of the new controls to self.tabIndex +1,2....etc.
A problem can arrise if there is already a control on the form with the next tab index. Jade will renumber the tab index of the subsequent controls the same way it does in painter. This can cause multiple tab indicies to be updated due to the newly created control, which all then have to be sent back to the app server.
The net result is you get a bunch of controls with different tab indexes to those set in painter, which all chew up traffic on the network.
This can be quite easily seen in the log file. You end up with something like this:
15:55:38 time=0 << #=1 Received (len=134) MyForm.createControl 15:55:38 time=0 >> #=2 Send (len=19) Notify property change: textbox.hwnd
15:55:38 time=0 << #=1 Received (len=10) textbox.maxLength 15:55:38 time=0 << #=1 Received (len=6) textbox.borderStyle 15:55:38 time=0 << #=1 Received (len=13) dteDOB.tabIndex 15:55:38 time=0 << #=1 Received (len=13) cmbRole.tabIndex 15:55:38 time=0 << #=1 Received (len=13) cmbOrganisation.tabIndex
15:55:38 time=0 << #=1 Received (len=13) txtStreetAddress.tabIndex
15:55:38 time=0 << #=1 Received (len=13) cmbDistrict.tabIndex 15:55:38 time=0 << #=1 Received (len=13) cmbCountry.tabIndex 15:55:38 time=0 << #=1 Received (len=13) txtPostCode.tabIndex
The first 4 lines are the new control being created in code, subsequent lines are JADE nudging the tab indexes along to fit the new control in, at a cost of 13 bytes of network traffic each. Bearing in mind that this can happen every time the form is created, for most of the controls on the form (if sequentially numbered) and at every client and it can add up to a lot of traffic.
The solution, of course, is to leave holes in the tab order numbering when you have controls that you know are going to allocate new controls.
CR
Discovered an issue with Jade thin client today that might be relevant to some of you.
We have a control that makes some subbordinate controls at run time (eg, in windowCreated). As part of the process it sets the tab order of the new controls to self.tabIndex +1,2....etc.
A problem can arrise if there is already a control on the form with the next tab index. Jade will renumber the tab index of the subsequent controls the same way it does in painter. This can cause multiple tab indicies to be updated due to the newly created control, which all then have to be sent back to the app server.
The net result is you get a bunch of controls with different tab indexes to those set in painter, which all chew up traffic on the network.
This can be quite easily seen in the log file. You end up with something like this:
15:55:38 time=0 << #=1 Received (len=134) MyForm.createControl 15:55:38 time=0 >> #=2 Send (len=19) Notify property change: textbox.hwnd
15:55:38 time=0 << #=1 Received (len=10) textbox.maxLength 15:55:38 time=0 << #=1 Received (len=6) textbox.borderStyle 15:55:38 time=0 << #=1 Received (len=13) dteDOB.tabIndex 15:55:38 time=0 << #=1 Received (len=13) cmbRole.tabIndex 15:55:38 time=0 << #=1 Received (len=13) cmbOrganisation.tabIndex
15:55:38 time=0 << #=1 Received (len=13) txtStreetAddress.tabIndex
15:55:38 time=0 << #=1 Received (len=13) cmbDistrict.tabIndex 15:55:38 time=0 << #=1 Received (len=13) cmbCountry.tabIndex 15:55:38 time=0 << #=1 Received (len=13) txtPostCode.tabIndex
The first 4 lines are the new control being created in code, subsequent lines are JADE nudging the tab indexes along to fit the new control in, at a cost of 13 bytes of network traffic each. Bearing in mind that this can happen every time the form is created, for most of the controls on the form (if sequentially numbered) and at every client and it can add up to a lot of traffic.
The solution, of course, is to leave holes in the tab order numbering when you have controls that you know are going to allocate new controls.
CR