-
Notifications
You must be signed in to change notification settings - Fork 15
Add a note about polled events and the later package #836
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
base: main
Are you sure you want to change the base?
Conversation
hmm if I set it to 1250ms or even disable polled events entirely I still get a short time. |
@lionel- I think I know why. Winston added # Put these in a block to ensure they're run without delay in between.
{
later::later(\() { finish <<- Sys.time(); cat("Finished!")}, 0)
start <- Sys.time()
}
# Wait for a moment after running block above.
# Then run:
finish - start This respects the 1250ms delay, and gets faster with the 50ms delay. (As he noted, we don't see the |
It's definitely tied to this delay, we run the input handlers here ark/crates/ark/src/sys/unix/interface.rs Line 100 in 3d42829
Which is called from ark/crates/ark/src/interface.rs Lines 1893 to 1902 in 3d42829
Which is what we do on each 50ms tick ark/crates/ark/src/interface.rs Line 924 in 3d42829
|
@@ -825,7 +825,8 @@ impl RMain { | |||
|
|||
// Process R's polled events regularly while waiting for console input. | |||
// We used to poll every 200ms but that lead to visible delays for the | |||
// processing of plot events. | |||
// processing of plot events, it also slowed down callbacks from the later | |||
// package. 50ms seems to be more in line with RStudio (posit-dev/positron#7235). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also add link to #791?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need, this is unrelated to the {later} issue.
@DavisVaughan Should we use an even smaller timeout?
Documenting that switching from 200ms to 50ms helped with posit-dev/positron#7235
We did the switch in this commit 452b84f