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 missing rerender on plot deletion #2447

Merged
merged 1 commit into from Nov 26, 2022
Merged

Conversation

ffreyer
Copy link
Collaborator

@ffreyer ffreyer commented Nov 26, 2022

Description

Another small fix for #2336 - making deletion of plots trigger a rerender of the scene.

On master

fig, ax, p = scatter(rand(10))
delete!(Makie.parent_scene(p), p)

will delete the render object but it will still be visible until an update is triggered by other means. With this it always queues a rerender.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

@MakieBot
Copy link
Collaborator

MakieBot commented Nov 26, 2022

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 28.68s (28.37, 29.18) 0.32+- 17.55s (17.45, 17.67) 0.08+- 16.57s (16.48, 16.69) 0.07+- 12.33ms (12.24, 12.41) 0.07+- 113.39ms (112.74, 113.97) 0.38+-
master 28.52s (28.44, 28.66) 0.08+- 17.47s (17.27, 17.72) 0.15+- 16.53s (16.35, 16.63) 0.11+- 12.47ms (12.39, 12.53) 0.05+- 113.88ms (113.29, 114.21) 0.31+-
evaluation +0.53%, 0.15s invariant (0.66d, 0.26p, 0.20std) +0.43%, 0.08s invariant (0.64d, 0.26p, 0.11std) +0.23%, 0.04s invariant (0.42d, 0.45p, 0.09std) -1.08%, -0.13ms faster ✓ (-2.13d, 0.00p, 0.06std) -0.43%, -0.49ms faster ✓ (-1.42d, 0.02p, 0.35std)
CairoMakie 29.91s (29.58, 30.37) 0.29+- 20.16s (19.75, 20.53) 0.28+- 2.89s (2.83, 2.93) 0.04+- 15.59ms (15.40, 16.01) 0.21+- 5.45ms (5.39, 5.50) 0.04+-
master 30.03s (29.76, 30.31) 0.20+- 20.06s (19.79, 20.29) 0.17+- 2.86s (2.80, 2.89) 0.03+- 15.57ms (15.34, 16.18) 0.30+- 5.43ms (5.26, 5.56) 0.10+-
evaluation -0.38%, -0.11s invariant (-0.45d, 0.42p, 0.25std) +0.54%, 0.11s invariant (0.46d, 0.41p, 0.23std) +1.14%, 0.03s invariant (0.89d, 0.12p, 0.04std) +0.17%, 0.03ms invariant (0.10d, 0.85p, 0.25std) +0.43%, 0.02ms invariant (0.32d, 0.56p, 0.07std)
WGLMakie 33.43s (32.90, 33.80) 0.29+- 26.93s (26.73, 27.09) 0.11+- 43.91s (43.60, 44.11) 0.17+- 19.53ms (18.60, 20.79) 0.90+- 1.95s (1.92, 1.99) 0.02+-
master 33.40s (33.11, 33.55) 0.15+- 26.89s (26.65, 27.25) 0.19+- 44.27s (44.02, 44.94) 0.33+- 17.86ms (17.35, 18.28) 0.37+- 1.71s (1.69, 1.73) 0.01+-
evaluation +0.06%, 0.02s invariant (0.09d, 0.87p, 0.22std) +0.16%, 0.04s invariant (0.27d, 0.62p, 0.15std) -0.81%, -0.35s faster ✓ (-1.36d, 0.03p, 0.25std) +8.55%, 1.67ms slower❌ (2.44d, 0.00p, 0.63std) +12.26%, 0.24s slower❌ (13.78d, 0.00p, 0.02std)

@SimonDanisch SimonDanisch merged commit 3230e0e into master Nov 26, 2022
@SimonDanisch SimonDanisch deleted the ff/rerender_on_delete branch November 26, 2022 09:52
t-bltg pushed a commit to t-bltg/Makie.jl that referenced this pull request Dec 31, 2022
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.

None yet

3 participants