Support says yes. But i cant get it faster than every 1 sec.
Im trying to send a API PUT Action every 0.1 second but it only sends aprox every second.
Its for a single user at a time, controlling a physical moving-head light in a public square for Copenhagen Light Festival opening next week.
We are able to send X/Y coordinates, but the slow response makes the user experience slow and sluggish. Is this due to the nature of the API or are we doing something wrong causing the delay?
We have tested our server from other sources than Bubble to make sure it can handle the fast request, and it works fine.
Yeah, Bubble workflows have sort of a minimum execution time. The issue is your Set State step. Setting and publishing a state like this doesn’t happen instantaneously, and nowhere near the speed of setting a variable in JavaScript.
I think this is because “set state” works by literally setting a state on an object in the DOM, and so is capped by the DOM refresh rate.
Anyway, for proof of this just go get List Shifter and put a Debug Buddy before and after your set state step to benchmark the execution time. You’ll see.
I keep thinking I have a video explaining this, but I can’t find it ATM. But basically, your request to execute that workflow every tenth of a second cannot happen because each workflow is taking longer than 100ms. This have nothing to do with capacity and is an entirely in-page issue.
I can’t think of a workaround except to lower your polling rate (you can determine the max polling rate using Debug Buddy to benchmark the start of each iteration), or write a plugin.
Thank you Keith! This makes a lot of sense. Are there other ways to stream to values our of Bubble more real-time? I have trawled the documentation for the “Use as: Data” option instead of the “Use as: Action” with PUT commands, in the API doc, but with no luck. I was thinking maybe that would be a faster way instead of the workflows, i just dont know how to send this “Data” from my app then if not from the workflow…
I just stumbled across the post “Server side actions now support Node modules” lots of talk about Real Time here…
Im basically just trying to send my X/Y data to a server running node.js, could this be a way for us to go? Just creating a plugin and passing the data from here?