I think I found a substantial lag between Gideros Player executing code and Studio's output window receiving output, and this made me curious.
I had a bug which seemed to crash my game before it could log anything. I found my problem using the debugger, but I am still puzzled how the crash seemed to "outrun" print(). The bug was after 100 lines of code, but output from several print() calls before line 100 never arrived in Studio's output window.
1- Is the lag entirely a result of the player and studio communicating over a network, basically my home WiFi?
2- I found this lag affected print()'s output. Can assert() or other core Lua error-reporting functions "outrun" crashes?
3- When an uploaded program crashes, is there a local log file or error file I can find and read?
I never took a CS course, so thanks for helping a hobbyist out!
Comments
Player outbound queue is emptied a bit each frame (up to 1024 bytes), so at 60fps the player can't send more than 60k characters of output per second. But between each 1k bloc, your lua code (events/enterframe) is executed too, which could limit the throughput even more. In addition, the player will refuse to enqueue more than 1024 packets for the studio, so if you use print a lot, you may hit this limit too. It is worth noting that each argument of a print call will count as two packets.
Then if you experience a hard crash (player closing), there are chances that enqueued packets will never reach the studio before the crash.
Finally the studio itself may take time processing the debug lines and appending them to the output window.
My bug happened immediately after procedural generation of a map, so that probably used up all the throughput.
It seems the debugger is essential for understanding such crashes so I should practice using it more often!