willi297 wrote:I run Ruby through sublime quite a bit. I believe that the debug p() method flushes stdout after each write to it. If you just do puts instead, you will likely see a bit improvement in performance, you just won't see live updates as they happen. I would add a periodic flush of stdio to compensate for that issue.
Thank you for your reply. I'm a needy bastard who's not interested in finding hack workarounds, but want it fixed in the tool itself. I understand that reducing the number of IO hits will help this. I want it to just work, however.
willi297 wrote:You're running an interpreter in another interpreter that is dumping the output to a control that is repopulated with interpreted python. You can't really compete with a raw C/C++ console with this setup...
I think you can come close enough. Certainly closer than 35.7ms for each IO hit.
The same program run in 'e' text editor, which is running the ruby script inside another ruby script under cygwin, and using the owning ruby script to capture the output and convert to HTML, which is being rendered and re-rendered by Trident to show the output, finishes in 0.008s. There's no need for Sublime to be over 4,000 times slower for capturing a line of flushed text and adding it to a console.