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

Improve Relocatability for GLMakie and fix tests #4461

Merged
merged 7 commits into from
Oct 10, 2024
Merged

Conversation

SimonDanisch
Copy link
Member

The tests didn't really test relocatability, since we only moved the package dir, but not the GLMakie source code.
This changes GLMakie to load all shaders on precompile, to make them part of the system image, much like what RelocatableFolder does it, but more explicitely (since we're caching + loading the shaders anyways).
Also deletes some dead code.

@MakieBot
Copy link
Collaborator

MakieBot commented Oct 9, 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 5.33s (5.31, 5.35) 0.02+- 117.39ms (114.80, 121.65) 2.54+- 436.93ms (429.68, 462.43) 11.64+- 9.83ms (9.69, 10.07) 0.14+- 26.61ms (26.46, 26.78) 0.11+-
master 5.28s (5.21, 5.39) 0.06+- 118.03ms (110.17, 124.32) 4.73+- 435.35ms (419.56, 450.43) 13.13+- 9.68ms (8.82, 10.18) 0.42+- 26.62ms (26.50, 26.74) 0.09+-
evaluation 0.99x invariant, 0.04s (0.89d, 0.14p, 0.04std) 1.01x invariant, -0.65ms (-0.17d, 0.76p, 3.63std) 1.00x invariant, 1.59ms (0.13d, 0.82p, 12.39std) 0.99x invariant, 0.15ms (0.46d, 0.42p, 0.28std) 1.00x invariant, -0.01ms (-0.06d, 0.91p, 0.10std)
CairoMakie 4.91s (4.87, 4.96) 0.04+- 110.64ms (109.62, 111.86) 0.74+- 167.45ms (166.29, 168.86) 0.92+- 9.65ms (9.36, 9.74) 0.14+- 1.21ms (1.14, 1.26) 0.03+-
master 4.90s (4.86, 4.95) 0.03+- 111.26ms (109.49, 113.84) 1.58+- 168.47ms (165.82, 172.66) 2.35+- 9.62ms (9.31, 9.74) 0.14+- 1.21ms (1.15, 1.23) 0.03+-
evaluation 1.00x invariant, 0.01s (0.37d, 0.50p, 0.03std) 1.01x invariant, -0.63ms (-0.51d, 0.37p, 1.16std) 1.01x invariant, -1.02ms (-0.57d, 0.31p, 1.63std) 1.00x invariant, 0.03ms (0.18d, 0.74p, 0.14std) 1.00x invariant, 0.0ms (0.03d, 0.95p, 0.03std)
WGLMakie 5.81s (5.53, 5.99) 0.15+- 131.25ms (113.25, 153.22) 15.06+- 5.92s (5.78, 6.09) 0.11+- 14.09ms (12.76, 14.96) 0.81+- 121.27ms (117.70, 123.96) 2.01+-
master 5.70s (5.55, 5.90) 0.13+- 118.74ms (111.45, 137.30) 8.89+- 5.69s (5.51, 5.78) 0.11+- 13.86ms (12.78, 16.06) 1.09+- 128.02ms (118.04, 169.25) 18.57+-
evaluation 0.98x invariant, 0.1s (0.73d, 0.20p, 0.14std) 0.90x noisy🤷‍♀️, 12.51ms (1.01d, 0.09p, 11.97std) 0.96x slower X, 0.23s (2.18d, 0.00p, 0.11std) 0.98x invariant, 0.23ms (0.24d, 0.66p, 0.95std) 1.06x noisy🤷‍♀️, -6.75ms (-0.51d, 0.38p, 10.29std)

@bjarthur
Copy link
Contributor

bjarthur commented Oct 9, 2024

+100 for all improvements to relocatability! there is also a similar outstanding PR for WGLMakie. still haven't found the time to finish that up.

jkrumbiegel and others added 2 commits October 10, 2024 10:48
use `run` to get printouts and `finally` to not swallow errors in `catch`
@SimonDanisch SimonDanisch merged commit 2828d67 into master Oct 10, 2024
18 checks passed
@SimonDanisch SimonDanisch deleted the sd/relocatable branch October 10, 2024 14:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Merged
Development

Successfully merging this pull request may close these issues.

4 participants