Acknowledged
CIQQA-3313

Holistic Review of CIQ Limitations for Large Applications

I'm currently developing a Connect IQ application that seems to push against nearly all of the platform’s limitations.

The app is a client for openHAB, a widely-used open-source home automation platform. Users configure what they want to see and control on the Garmin device via the openHAB server—ranging from a few devices to fully integrated smart homes.

Through this work, I've encountered several areas where the Connect IQ platform presents challenges for more complex applications.

1. Network Request Limits (-402 Error)

My app can hit the -402 request limit. While this is handled fairly well by the API, the behavior is not well documented and differs between the simulator and real devices.

https://forums.garmin.com/developer/connect-iq/i/bug-reports/request-for-documentation-and-simulator-accuracy-on-makewebrequest-limits

2. Storage Limits

The documented storage limits appear inconsistent and do not reflect actual behavior. Storage.setValue() can store more data than expected, but this consumes significant memory—and if the memory limit is hit, the app crashes without warning. It’s difficult to guard against this.

https://forums.garmin.com/developer/connect-iq/i/bug-reports/storage-setvalue-should-handle-memory-limits-gracefully

3. Stack Size and Recursive Structures

When parsing complex or recursive JSON structures, I encounter stack overflows. While I’ve restructured parts of the code to use iterative processing, it comes with overhead. A modest increase in stack size—at least as an option—could be helpful for apps like mine.

https://forums.garmin.com/developer/connect-iq/i/bug-reports/proposal-allow-larger-stack-for-recursive-data-handling

4. Watchdog Limit Handling

The Watchdog limit is another frequent bottleneck. While I work around it using an asynchronous task queue, there's no visibility into the remaining execution budget. A system stat indicating remaining Watchdog time, along with a native task queue implementation in the SDK, would be extremely valuable.

https://forums.garmin.com/developer/connect-iq/i/bug-reports/suggestion-watchdog-budget-indicator-and-built-in-task-queue-support-in-sdk

5. Profiler Reliability

Accurate profiling is critical for performance tuning in larger apps, but the current profiler can mislabel or misreport entries—making it difficult to trust the results. I’ve encountered this personally, and others have reported similar issues.

Example issue: https://forums.garmin.com/developer/connect-iq/i/bug-reports/bug-profiler-inconsistency

6. Conclusion

As you can see, I’ve submitted several targeted suggestions and bug reports. The purpose of this post is to suggest looking at these issues more holistically.

It's completely understandable that wearables have limited resources compared to phones or tablets. But if CIQ is to support more capable and dynamic apps, then:

  • Limits should be clearly documented.

  • The SDK should provide tools and APIs that help developers handle these limits gracefully.

I'm not sure if supporting larger apps like mine aligns with Garmin’s vision for CIQ. But if it does, I believe there’s important work to be done to make that experience more robust and developer-friendly.

  • Understand those limits are based on the specific device as well as your app itself, so it's not that straight forward.

  • I don't think there's one developer that wouldn't want bigger limits, but maybe, just maybe if you have so many problems, then this is the time to question if your idea is a good match for this platform.

    So, if you read my post and conclusion, you'll see that my suggestions aren't primarily about increasing the limits (aside from the stack size), but rather about improving the documentation of those limits and how the API deals with them. My app runs just fine within the current constraints, but dealing with those limits was unnecessarily painful. That’s where I believe the SDK and API could do better—by providing clearer guidance and more robust handling, which would make the development experience smoother and more predictable.

  • I don't think there's one developer that wouldn't want bigger limits, but maybe, just maybe if you have so many problems, then this is the time to question if your idea is a good match for this platform.

    Another thing you can try is to add a proxy that cuts the huge data to smaller chunks and enables older devices to be able to download them in small enough chunks that don't trigger these problems.