Hi,
I have a small issue with a comms app that collects data from an instrument and displays it in a dialog running in a separate thread. The data in only a question of 140 bytes, all ASCII, and the comms receive procedure runs in its own thread.
The app works well but slowly - the data arrives at 115.2kbaud and should take a maximum of 15ms to be transmitted however the time between reception and display is some 500ms. This latency can be reduced by a large factor if I move the main dialog, thus causing a repaint, or open any of the menus and leave the mouse within the menu area. Sounds to me as if the activity of any windows messages causes the app to run faster.
All dialog controls and menus are dealt with in the dialog callback (i.e. there are no independent callbacks for any control or menu) and all the comms routines (reception, command interpreter etc.) run in a separate thread.
Why should opening a menu or causing a repaint cause my comms thread to work faster? Is this known behaviour or simply something that I have done wrong?
Anyone out there seen this type of behaviour before?
John
I have a small issue with a comms app that collects data from an instrument and displays it in a dialog running in a separate thread. The data in only a question of 140 bytes, all ASCII, and the comms receive procedure runs in its own thread.
The app works well but slowly - the data arrives at 115.2kbaud and should take a maximum of 15ms to be transmitted however the time between reception and display is some 500ms. This latency can be reduced by a large factor if I move the main dialog, thus causing a repaint, or open any of the menus and leave the mouse within the menu area. Sounds to me as if the activity of any windows messages causes the app to run faster.
All dialog controls and menus are dealt with in the dialog callback (i.e. there are no independent callbacks for any control or menu) and all the comms routines (reception, command interpreter etc.) run in a separate thread.
Why should opening a menu or causing a repaint cause my comms thread to work faster? Is this known behaviour or simply something that I have done wrong?
Anyone out there seen this type of behaviour before?
John
Comment