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

widen types so rich text can be used in legends #2902

Merged
merged 1 commit into from Apr 27, 2023

Conversation

jkrumbiegel
Copy link
Collaborator

Making RichText not <: AbstractString anymore had the unintended consequence of making it unusable with Legend due to AbstractString type constraints in a couple of places. Now I've made this Any because String, LatexString and RichText are all so different anyway.

@jkrumbiegel jkrumbiegel linked an issue Apr 27, 2023 that may be closed by this pull request
@MakieBot
Copy link
Collaborator

MakieBot commented Apr 27, 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 44.08s (42.90, 45.02) 0.89+- 21.23s (19.60, 22.80) 0.98+- 19.49s (18.18, 21.33) 1.08+- 13.02ms (11.78, 13.92) 0.65+- 161.26ms (147.25, 172.29) 8.10+-
master 43.57s (40.21, 45.28) 1.73+- 20.97s (19.67, 21.87) 0.70+- 19.33s (18.66, 20.00) 0.49+- 13.04ms (12.29, 14.09) 0.61+- 161.65ms (154.64, 165.87) 3.93+-
evaluation +1.14%, 0.5s invariant (0.37d, 0.51p, 1.31std) +1.22%, 0.26s invariant (0.30d, 0.58p, 0.84std) +0.82%, 0.16s invariant (0.19d, 0.73p, 0.78std) -0.15%, -0.02ms invariant (-0.03d, 0.95p, 0.63std) -0.24%, -0.39ms invariant (-0.06d, 0.91p, 6.02std)
CairoMakie 37.53s (36.17, 38.78) 0.94+- 19.39s (18.51, 20.18) 0.68+- 2.95s (2.75, 3.07) 0.12+- 12.26ms (11.79, 12.72) 0.33+- 5.11ms (4.89, 5.28) 0.13+-
master 37.27s (36.91, 37.87) 0.43+- 19.47s (18.91, 19.91) 0.35+- 2.84s (2.77, 2.99) 0.07+- 12.16ms (11.77, 12.53) 0.33+- 5.51ms (5.28, 5.73) 0.18+-
evaluation +0.70%, 0.26s invariant (0.36d, 0.52p, 0.68std) -0.43%, -0.08s invariant (-0.15d, 0.78p, 0.51std) +3.88%, 0.11s invariant (1.17d, 0.05p, 0.10std) +0.84%, 0.1ms invariant (0.31d, 0.57p, 0.33std) -7.98%, -0.41ms faster✅ (-2.59d, 0.00p, 0.16std)
WGLMakie 42.44s (42.36, 42.56) 0.07+- 21.09s (20.97, 21.23) 0.11+- 21.21s (21.01, 21.44) 0.19+- 13.29ms (12.27, 14.29) 0.72+- 728.01ms (680.12, 775.44) 30.51+-
master 42.49s (42.27, 42.63) 0.13+- 21.11s (21.02, 21.23) 0.07+- 21.25s (20.94, 21.64) 0.26+- 13.02ms (11.90, 14.06) 0.63+- 736.53ms (702.17, 799.54) 35.98+-
evaluation -0.12%, -0.05s invariant (-0.48d, 0.39p, 0.10std) -0.12%, -0.03s invariant (-0.28d, 0.61p, 0.09std) -0.18%, -0.04s invariant (-0.16d, 0.76p, 0.22std) +2.03%, 0.27ms invariant (0.40d, 0.47p, 0.68std) -1.17%, -8.52ms invariant (-0.26d, 0.64p, 33.25std)

@jkrumbiegel jkrumbiegel merged commit 1f91e94 into master Apr 27, 2023
14 checks passed
@jkrumbiegel jkrumbiegel deleted the jk/widen-legend-string-types branch April 27, 2023 19:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Ready, but unreviewed
Development

Successfully merging this pull request may close these issues.

Cannot use rich text in legends anymore
4 participants