• We're developing an application that requires fast sampling of pins, say every 20ms via setInterval; while "concurrently" we need to do an HTTP PUT every second or so. With some simple demos we've learned that Espruino tends to be a bit choppy and drops readings while performing the queued network requests.

    I managed to trace this to two things (and please correct me if I'm wrong):

    1. The HTTP request is handled whenever Espruino is idle (good).
    2. When the HTTP networking code handles a queued request, it never yields along the way to the main event loop; hence, it takes priority over timer intervals and your own processing (bad).

    Please shed some light on this, and correct me if any of my observations are invalid.

    We would love to get more perceived "concurrency" while network request are being handled, and we're even willing to throw some dev resources at the problem to improve this for others.

    Any feedback is appreciated.
    Thx!

About

Avatar for Jscott @Jscott started