File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -805,7 +805,9 @@ impl RMain {
805
805
let tasks_interrupt_rx = self . tasks_interrupt_rx . clone ( ) ;
806
806
let tasks_idle_rx = self . tasks_idle_rx . clone ( ) ;
807
807
808
- // Process R's polled events regularly while waiting for console input
808
+ // Process R's polled events regularly while waiting for console input.
809
+ // We used to poll every 200ms but that lead to visible delays for the
810
+ // processing of plot events.
809
811
let polled_events_rx = crossbeam:: channel:: tick ( Duration :: from_millis ( 50 ) ) ;
810
812
811
813
let r_request_index = select. recv ( & r_request_rx) ;
@@ -1881,7 +1883,11 @@ impl RMain {
1881
1883
// https://github.com/rstudio/positron/issues/431
1882
1884
unsafe { R_RunPendingFinalizers ( ) } ;
1883
1885
1884
- // Check for Positron render requests
1886
+ // Check for Positron render requests.
1887
+ //
1888
+ // TODO: This should move to a spawned task that'd be woken up by
1889
+ // incoming messages on plot comms. This way we'll prevent the delays
1890
+ // introduced by timeout-based event polling.
1885
1891
graphics_device:: on_process_idle_events ( ) ;
1886
1892
}
1887
1893
You can’t perform that action at this time.
0 commit comments