mqtt_client
mqtt_client copied to clipboard
Memory leaks on android with 500 msg/s rate
Is the benchmark or stress tests for client? How to avoid freeze and memory leak when messages rate about 1k?
There's no benchmark suite that I know of although other users have run the client at a greater message rate than this, I think one user was up to 5000 messages per second.
Not sure what you mean by 'freeze and memory leak', the package is just dart code that runs in the VM, browser or flutter runtime, the runtime handles garbage collection(Dart is a GC language, there should be no memory leaks), it also handles runtime aspects of the platform such as networking for instance.
How do you know this is a problem with the client as opposed to the Dart runtime on the platform you are using?
I use client in flutter on the Android. In profile mode i see, that on some rate(about 800 msg/s on old tablet, and 2.5k on new phone), the memory growth from 500mb to 1g and not clean, the app in this time freeze.
OK, this may be the runtime GC kicking in or trying to kick in, either way the client can't do anything about this. Does it ever recover from the freeze?
Sometimes it recover