Describe the bug
Interruption checks are very expensive, especially with RStudio.
Note that "interruption checks" don't just check for interruption. They also hand back control to the GUI event loop. E.g. on Windows the R GUI would lock up during computations without interruption checks.
To reproduce
g <- make_ring(100000000)
system.time(is_connected(g))
Do not use a timing mechanism that runs the command multiple times, as is_connected is cached on the 0.10 branch.
With interruption checks disabled completely, this runs in 1.419 seconds.
Otherwise I get 2.982 s on the command line and 24.634 s in RStudio. With the R GUI, I get 3.649 s. All of these are on macOS / arm64.
These measurements are with the 0.10 branch, but main is similar.
Version information
Issue present both on the main and igraph-0.10 branches.
Describe the bug
Interruption checks are very expensive, especially with RStudio.
Note that "interruption checks" don't just check for interruption. They also hand back control to the GUI event loop. E.g. on Windows the R GUI would lock up during computations without interruption checks.
To reproduce
Do not use a timing mechanism that runs the command multiple times, as
is_connectedis cached on the 0.10 branch.With interruption checks disabled completely, this runs in 1.419 seconds.
Otherwise I get 2.982 s on the command line and 24.634 s in RStudio. With the R GUI, I get 3.649 s. All of these are on macOS / arm64.
These measurements are with the 0.10 branch, but
mainis similar.Version information
Issue present both on the
mainandigraph-0.10branches.