-
Notifications
You must be signed in to change notification settings - Fork 326
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GUI freezes causes timeouts to be incorrectly reported #6660
Comments
I can confirm the timeouts, will try to find the source of them. |
I cannot reproduce it on my machine on the |
LS says it sent the response at The only other explanation is that the timestamp reported in the LS logs is not precise, and the actual response was sent later than logged The portion of the response logic that logs the timestamp of the message being sent is in https://github.com/enso-org/enso/blob/develop/lib/scala/json-rpc-server/src/main/scala/org/enso/jsonrpc/JsonRpcServer.scala#L84.
|
Are you sure about it? Given that web is an extremely single-threaded environment, I just assumed the browser does not handle incoming messages until it gets back the steering. But if there is a guarantee (or you just tested that), then indeed looks suspicious. |
I would start with making sure IDE, having both message received and timeout fired, prefers the former. |
I am not sure about that. So, the most probable scenario is that IDE does process the message very slowly because it is blocked by other stuff. |
Yep, this is what happens. Everything that has to touch the JS environment (e.g. async http responses or ws frames) is handled through the JS event reactor as an independent task. The requests though are send immediately, as the action of actually sending it doesn't have any observable effect on the JS side. The scheduled reactor tasks can only execute one at a time, so if we keep processing one for >10s, the timeout can fire before the response processing task is executed.
I believe that this is the general solution, but specifics can be a bit tricky to get right. Currently, the response and timeout are handled like this: enso/lib/rust/json-rpc/src/handler.rs Lines 300 to 304 in 753f787
The timeout is created with a So, we have to do something more involved than a single timer. We could try waiting an extra render frame after the |
Closing as doesn't seem to be reproducible in newest develop. |
Discord username
No response
What type of issue is this?
Permanent – Occurring repeatably
Is this issue blocking you from using Enso?
Is this a regression?
What issue are you facing?
When I try to exit node creation (Component browser open and exit
tab
->esc
) it leaves blank node for a while then either writes "nothing" inside the node or removes it from the canvas.2305121355_shareX.mp4
2305121357_shareX.mp4
Expected behaviour
closing CB without node creation is instant and leaves no traces (nodes behind)
How we can reproduce it?
open larger project
Unnamed_5 (2).zip
drag connection from an output port
cancel node creation
Screenshots or screencasts
No response
Enso Version
2023.5.12 nightly
Browser or standalone distribution
Standalone distribution
Browser Version or standalone distribution
standalone
Operating System
Windows
Operating System Version
Win11pro 22H2 22621.1555
Hardware you are using
12th Gen Intel(R) Core(TM) i9-12900HK / RTX3060 Laptop / Nvidia Drivers 531.68
The text was updated successfully, but these errors were encountered: