File tree 1 file changed +8
-2
lines changed
1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -776,7 +776,9 @@ impl RMain {
776
776
let tasks_interrupt_rx = self . tasks_interrupt_rx . clone ( ) ;
777
777
let tasks_idle_rx = self . tasks_idle_rx . clone ( ) ;
778
778
779
- // Process R's polled events regularly while waiting for console input
779
+ // Process R's polled events regularly while waiting for console input.
780
+ // We used to poll every 200ms but that lead to visible delays for the
781
+ // processing of plot events.
780
782
let polled_events_rx = crossbeam:: channel:: tick ( Duration :: from_millis ( 50 ) ) ;
781
783
782
784
let r_request_index = select. recv ( & r_request_rx) ;
@@ -1841,7 +1843,11 @@ impl RMain {
1841
1843
// https://github.com/rstudio/positron/issues/431
1842
1844
unsafe { R_RunPendingFinalizers ( ) } ;
1843
1845
1844
- // Check for Positron render requests
1846
+ // Check for Positron render requests.
1847
+ //
1848
+ // TODO: This should move to a spawned task that'd be woken up by
1849
+ // incoming messages on plot comms. This way we'll prevent the delays
1850
+ // introduced by timeout-based event polling.
1845
1851
graphics_device:: on_process_idle_events ( ) ;
1846
1852
}
1847
1853
You can’t perform that action at this time.
0 commit comments