swiftfiddle-web icon indicating copy to clipboard operation
swiftfiddle-web copied to clipboard

Frequently hangs during typing, possibly due to intellisense/suggestions pop-up

Open runofthemillgeek opened this issue 8 months ago • 4 comments

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.

runofthemillgeek avatar Mar 28 '25 06:03 runofthemillgeek

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 avatar Mar 29 '25 05:03 kishikawakatsumi

@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.

runofthemillgeek avatar Apr 02 '25 12:04 runofthemillgeek

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.

kishikawakatsumi avatar Apr 03 '25 02:04 kishikawakatsumi

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.

Piratux avatar Jun 08 '25 15:06 Piratux