Skip to content
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

Fix Makie.inline!(...) for most cases #2919

Merged
merged 2 commits into from
May 8, 2023
Merged

Fix Makie.inline!(...) for most cases #2919

merged 2 commits into from
May 8, 2023

Conversation

SimonDanisch
Copy link
Member

@SimonDanisch SimonDanisch commented May 5, 2023

This should fix #2805 and #2901.
It's still not perfect, but I think at this point only a breaking change can improve upon this.

@MakieBot
Copy link
Collaborator

MakieBot commented May 5, 2023

Compile Times benchmark

Note, that these numbers may fluctuate on the CI servers, so take them with a grain of salt. All benchmark results are based on the mean time and negative percent mean faster than the base branch. Note, that GLMakie + WGLMakie run on an emulated GPU, so the runtime benchmark is much slower. Results are from running:

using_time = @ctime using Backend
# Compile time
create_time = @ctime fig = scatter(1:4; color=1:4, colormap=:turbo, markersize=20, visible=true)
display_time = @ctime Makie.colorbuffer(display(fig))
# Runtime
create_time = @benchmark fig = scatter(1:4; color=1:4, colormap=:turbo, markersize=20, visible=true)
display_time = @benchmark Makie.colorbuffer(display(fig))
using create display create display
GLMakie 40.15s (39.39, 41.03) 0.50+- 18.48s (18.22, 18.74) 0.19+- 16.87s (16.69, 17.49) 0.29+- 12.02ms (11.59, 12.40) 0.28+- 141.29ms (137.70, 147.86) 3.19+-
master 40.32s (39.90, 40.67) 0.31+- 18.65s (18.03, 19.35) 0.55+- 17.17s (16.63, 17.79) 0.41+- 11.96ms (11.80, 12.20) 0.17+- 137.63ms (135.37, 139.13) 1.56+-
evaluation -0.40%, -0.16s invariant (-0.39d, 0.48p, 0.40std) -0.91%, -0.17s invariant (-0.41d, 0.47p, 0.37std) -1.79%, -0.3s invariant (-0.85d, 0.14p, 0.35std) +0.42%, 0.05ms invariant (0.22d, 0.69p, 0.23std) +2.59%, 3.65ms slower X (1.45d, 0.02p, 2.38std)
CairoMakie 33.49s (33.37, 33.63) 0.09+- 18.19s (18.06, 18.33) 0.10+- 2.74s (2.71, 2.76) 0.02+- 10.34ms (10.26, 10.42) 0.06+- 4.95ms (4.84, 5.02) 0.07+-
master 33.40s (33.23, 33.50) 0.08+- 18.23s (18.11, 18.40) 0.12+- 2.73s (2.71, 2.76) 0.02+- 10.45ms (10.28, 10.63) 0.10+- 5.02ms (4.79, 5.18) 0.13+-
evaluation +0.27%, 0.09s invariant (1.01d, 0.08p, 0.09std) -0.23%, -0.04s invariant (-0.37d, 0.50p, 0.11std) +0.15%, 0.0s invariant (0.22d, 0.69p, 0.02std) -1.05%, -0.11ms faster ✓ (-1.28d, 0.04p, 0.08std) -1.47%, -0.07ms invariant (-0.71d, 0.22p, 0.10std)
WGLMakie 54.76s (54.09, 55.01) 0.31+- 27.96s (27.52, 28.57) 0.36+- 28.32s (27.77, 28.64) 0.29+- 19.13ms (18.03, 20.68) 1.01+- 1.02s (0.96, 1.05) 0.04+-
master 54.63s (54.31, 55.05) 0.25+- 28.30s (27.94, 28.83) 0.29+- 28.64s (28.08, 29.47) 0.45+- 19.00ms (17.71, 20.32) 0.82+- 1022.93ms (964.62, 1052.47) 29.22+-
evaluation +0.24%, 0.13s invariant (0.46d, 0.41p, 0.28std) -1.22%, -0.34s invariant (-1.05d, 0.07p, 0.32std) -1.15%, -0.33s invariant (-0.87d, 0.14p, 0.37std) +0.70%, 0.13ms invariant (0.15d, 0.79p, 0.92std) -0.64%, -0.01s invariant (-0.20d, 0.72p, 0.03std)

@SimonDanisch
Copy link
Member Author

I've tested this on a few platforms with Pluto, IJulia, VSCode and REPL and things seem to work mostly as expected besides a few expected issues with WGLMakie, because the display system via JSServe and the browser is a bit more complex.
E.g. inline!(false) doesn't help to open a browser window with WGLMakie when in VSCode with active plotpane, because it would need to communicate this to JSServe which does the actual displaying.
The good news is, disabling the plotpane now at least starts opening a browser window with WGLMakie, and the same is true for the REPL.
I hope this won't introduce any other weird issues with E.g. documenter, but I think most corner cases should work fine now (but are hard to test).

@SimonDanisch SimonDanisch merged commit 29c9784 into master May 8, 2023
13 checks passed
@SimonDanisch SimonDanisch deleted the sd/fix-inline branch May 8, 2023 19:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Inline plots stopped appearing
2 participants