Hi, All
I'm debugging the app that dynamically scan COM-ports under Windows, connect to all free ones and wait for a data flow of MCU equipment.
So, each COM-port is connected by a class. And actually only one COM-port is active under test recently.
I.e. when a new COM-port is found, connected - collecting the traffic is stared, to a buffer, checking the start\stop markers and parsing the data.
COM-ports speed is fixed just of 9600 baud.
App is B4Xpage-based, 4 pages, main and second (and 2 rarely used utility topmost windows).
But when parsing is started - the app memory consumption is rised from 160 MB to 300+ and freezing beginning.
AsyncStreams should work in non-main thread, as i remember, speed is .... not big, data records frequency into SQLite db is 1....10 records per second only.
If to stop parsing - memory is not freed, but freezing is ended after some seconds only, not immediately flow is ended.
During this freezing the device disconnecting is processed by the app only after the port buffer is empty, or cannot be processed, and port is blocked until replugging and killing the app.
How to debug where the "bottle neck" is ?
I'm debugging the app that dynamically scan COM-ports under Windows, connect to all free ones and wait for a data flow of MCU equipment.
So, each COM-port is connected by a class. And actually only one COM-port is active under test recently.
I.e. when a new COM-port is found, connected - collecting the traffic is stared, to a buffer, checking the start\stop markers and parsing the data.
COM-ports speed is fixed just of 9600 baud.
App is B4Xpage-based, 4 pages, main and second (and 2 rarely used utility topmost windows).
But when parsing is started - the app memory consumption is rised from 160 MB to 300+ and freezing beginning.
AsyncStreams should work in non-main thread, as i remember, speed is .... not big, data records frequency into SQLite db is 1....10 records per second only.
If to stop parsing - memory is not freed, but freezing is ended after some seconds only, not immediately flow is ended.
During this freezing the device disconnecting is processed by the app only after the port buffer is empty, or cannot be processed, and port is blocked until replugging and killing the app.
How to debug where the "bottle neck" is ?
Last edited: