swiftfiddle-web
swiftfiddle-web copied to clipboard
Frequently hangs during typing, possibly due to intellisense/suggestions pop-up
As soon as I start typing a few characters, the page hangs for about a second or so. After the pause, rest of the characters I typed show up.
Seems like something is blocking the main thread whenever I'm typing, possibly the logic associated with rendering of suggestions/intellisense pop-up. I'm not trying to navigate intellisense at all — just typing the whole thing out like print(). See the recording below.
https://github.com/user-attachments/assets/283e1d74-7c89-4965-87cc-a72cab08c9ea
I've checked the site on Chrome/Safari with fresh profiles and no extensions, it's the same experience.
To me, it seems to work fast enough. The behavior of the editor on the web is inevitably inferior to that of the editor on the local computer.
@kishikawakatsumi agreed but the monaco editor's suggestions on other sites (StackBlitz/CodeSandbox) never felt this slow to me, hence thought to raise this issue.
Manually overriding monaco's options (by creating a breakpoint in devtools and capturing editor instance) to disable all suggestions/hints does bring back the speed.
I understand that the cause is code completion. SwiftFiddle's code completion communicates with the server-side SourceKit-LSP, so it is not a built-in mechanism for MonacoEditor. Based on this, I think that the speed is sufficient.
I have experienced similar issue. Occasionally when typing the text, typed characters just don't show up until suggestion box pops up. The unresponsiveness somewhat worsens the experience when trying to test small snippets of code.