iOS Question Ble slowdown phone

alizeti

Member
Licensed User
hi,

Any idea why after a certain time (couple of minutes around 10min) of continuous data coming from ble, the phone could become really slow to react to touch command!?

On iPhone X seams good, but iPhone 5 and 5s it’s really bad after that period of time.

Thanks.
 

alizeti

Member
Licensed User
It's a bike application.
So the ble module sends data from the bike to the phone using BLE.
It sends around 380 bytes of data every 200ms.

Once all data is received, it's parses into 2 differents arrays (data and id). Then a timer that runs every 500ms will update the interface with the data.
Speed, power, assist level, torque, current, power, etc.

I try to disable the interface timer and looks like the cpu usage stays around the same level, but if interface timer is enable, it get more and more cpu usage. It's more obvious when using older phones like under the iphone 6.
 

techknight

Well-Known Member
Licensed User
It's a bike application.
So the ble module sends data from the bike to the phone using BLE.
It sends around 380 bytes of data every 200ms.

Once all data is received, it's parses into 2 differents arrays (data and id). Then a timer that runs every 500ms will update the interface with the data.
Speed, power, assist level, torque, current, power, etc.

I try to disable the interface timer and looks like the cpu usage stays around the same level, but if interface timer is enable, it get more and more cpu usage. It's more obvious when using older phones like under the iphone 6.
I agree with Erel, its something in your code somewhere.

I use BLE and am sending 128 byte packets every 100ms and have yet to have an issue.
 

alizeti

Member
Licensed User
I think I might have found the problem. If I disable the timer that update the GUI, I don't have any issue. Inside that interface, there are 2 graphs that accumulates data from ble (speed and power). I have a clear button for those 2 graphs and I will see if phone reacts faster after I clear them.
 

techknight

Well-Known Member
Licensed User
Graphs are a good source of memory leaks.

You never want to store your ENTIRE data run in a graph. My thought is the graph should only contain a partial of data, thats selectable by the user, whereas all the data is stored in a variable instead.

If you want to display all the data points in a graph, that should be done after the fact.
 
Top