I'm curious how others are handling the execution time limits imposed by the Watchdog.
My app performs computations that exceed the maximum allowed duration for consecutive code execution. As discussed in other threads, I'm using a timer-driven task queue to manage this. The workload is split into smaller tasks, which are executed in batches. Each batch runs for a fixed duration, after which execution pauses and a 50 ms timer is set to trigger the next batch.
When UI responsiveness is important, I limit the batch duration to around 100 ms. This, of course, slows down overall processing—100 ms of computation effectively takes 150 ms when you include the timer delay.
Now I’m exploring a mode where speed is more important than responsiveness. In this case, I’d like to push the batch duration as close as possible to the Watchdog limit without triggering it.
Does anyone have experience with reliably determining or managing this limit?
For example, in the simulator, I’ve observed the Watchdog kicking in somewhere between 250 ms and 300 ms on one device. Can I expect similar behavior on real hardware?
Also, I noticed that simulator.json
contains a watchdogCount
for each device. Does anyone know what this value represents? Is it time-based, or does it count computational steps in some way?