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

Use a temp dir instead of mutating the CairoMakie src dir #3588

Merged
merged 2 commits into from
Feb 4, 2024

Conversation

jkrumbiegel
Copy link
Member

@jkrumbiegel jkrumbiegel commented Feb 1, 2024

Fixes #3519

I think a temp dir is the simplest solution. These should theoretically be cleaned up by Julia before exiting, so it shouldn't litter the file system. I also think it's better to make new files rather than reuse one, because a user might look at different versions at the same time.

@MakieBot
Copy link
Collaborator

MakieBot commented Feb 1, 2024

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(fig)
using create display create display
GLMakie 3.41s (3.40, 3.43) 0.01+- 380.24ms (376.27, 385.06) 3.06+- 472.84ms (462.41, 512.90) 17.82+- 7.09ms (7.01, 7.14) 0.04+- 25.36ms (25.33, 25.40) 0.03+-
master 3.42s (3.39, 3.44) 0.02+- 362.47ms (304.35, 392.03) 37.95+- 465.79ms (461.58, 471.11) 3.57+- 7.09ms (7.02, 7.12) 0.04+- 25.37ms (25.33, 25.42) 0.03+-
evaluation 1.00x invariant, -0.01s (-0.41d, 0.46p, 0.01std) 0.95x invariant, 17.77ms (0.66d, 0.26p, 20.50std) 0.99x invariant, 7.04ms (0.55d, 0.34p, 10.69std) 1.00x invariant, 0.0ms (0.06d, 0.91p, 0.04std) 1.00x invariant, -0.0ms (-0.10d, 0.86p, 0.03std)
CairoMakie 3.04s (3.01, 3.09) 0.03+- 320.85ms (318.53, 328.58) 3.53+- 139.86ms (139.05, 143.49) 1.61+- 7.20ms (7.08, 7.29) 0.07+- 600.48μs (595.26, 605.85) 3.43+-
master 3.03s (3.00, 3.08) 0.04+- 320.33ms (317.78, 322.85) 2.08+- 139.93ms (138.15, 141.86) 1.32+- 7.21ms (7.13, 7.43) 0.11+- 605.67μs (601.70, 607.96) 2.05+-
evaluation 1.00x invariant, 0.01s (0.19d, 0.73p, 0.03std) 1.00x invariant, 0.52ms (0.18d, 0.74p, 2.81std) 1.00x invariant, -0.07ms (-0.05d, 0.93p, 1.47std) 1.00x invariant, -0.0ms (-0.02d, 0.97p, 0.09std) 1.01x faster ✓, -5.19μs (-1.84d, 0.01p, 2.74std)
WGLMakie 3.72s (3.65, 3.80) 0.05+- 323.89ms (316.05, 337.23) 7.10+- 8.86s (8.72, 8.99) 0.10+- 9.25ms (8.91, 9.79) 0.31+- 72.38ms (67.07, 78.33) 4.20+-
master 3.72s (3.63, 3.86) 0.07+- 319.53ms (316.35, 326.13) 3.98+- 8.90s (8.73, 9.07) 0.14+- 9.12ms (8.93, 9.38) 0.15+- 73.90ms (68.79, 81.45) 4.46+-
evaluation 1.00x invariant, 0.0s (0.01d, 0.98p, 0.06std) 0.99x invariant, 4.36ms (0.76d, 0.19p, 5.54std) 1.00x invariant, -0.04s (-0.36d, 0.51p, 0.12std) 0.99x invariant, 0.12ms (0.51d, 0.37p, 0.23std) 1.02x invariant, -1.52ms (-0.35d, 0.52p, 4.33std)

@jkrumbiegel
Copy link
Member Author

@SimonDanisch any idea why this would break relocatability of glmakie?

@jkrumbiegel jkrumbiegel merged commit 94a336f into master Feb 4, 2024
17 checks passed
@jkrumbiegel jkrumbiegel deleted the jk/fix-repo-mutation-on-display branch February 4, 2024 14:43
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.

CairoMakie display mutates package directory
2 participants