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

Make scene.visible trigger render updates #2813

Merged
merged 1 commit into from
Mar 31, 2023

Conversation

ffreyer
Copy link
Collaborator

@ffreyer ffreyer commented Mar 28, 2023

Description

Reported on discord.

We should probably also have scene.visible propagate to other child scenes because right now

f, a, p = scatter(rand(10))
a.blockscene.visible[] = false
a.scene.parent === a.blockscene
# true

results in

Screenshot from 2023-03-28 14-18-25

I also noticed we're not using Observables.inputs (for map!/map at least)
https://github.com/JuliaGizmos/Observables.jl/blob/28bcea62fc74d34f132dd481804ba2a0ba0efcbe/src/Observables.jl#L515
Don't we want that for better bookkeeping?

Type of change

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

@SimonDanisch
Copy link
Member

Oh, I never merged & tagged JuliaGizmos/Observables.jl#105 should bring back the book keeping!

@MakieBot
Copy link
Collaborator

MakieBot commented Mar 28, 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 38.39s (38.12, 38.57) 0.17+- 17.38s (17.23, 17.51) 0.09+- 16.02s (15.89, 16.15) 0.11+- 10.90ms (10.66, 11.19) 0.16+- 133.31ms (129.50, 135.78) 2.20+-
master 38.53s (38.21, 38.74) 0.19+- 17.37s (17.25, 17.61) 0.12+- 15.96s (15.79, 16.33) 0.17+- 10.94ms (10.68, 11.04) 0.13+- 132.28ms (128.91, 134.70) 1.95+-
evaluation -0.35%, -0.14s invariant (-0.76d, 0.18p, 0.18std) +0.06%, 0.01s invariant (0.09d, 0.87p, 0.11std) +0.33%, 0.05s invariant (0.36d, 0.51p, 0.14std) -0.44%, -0.05ms invariant (-0.33d, 0.55p, 0.14std) +0.77%, 1.03ms invariant (0.50d, 0.37p, 2.08std)
CairoMakie 42.45s (40.65, 44.48) 1.29+- 22.95s (21.93, 24.02) 0.85+- 3.39s (3.22, 3.50) 0.11+- 17.31ms (16.58, 17.76) 0.40+- 8.25ms (7.65, 8.75) 0.44+-
master 42.56s (41.21, 44.38) 1.18+- 22.92s (22.25, 24.30) 0.79+- 3.35s (3.19, 3.59) 0.14+- 17.31ms (16.75, 17.83) 0.40+- 8.78ms (7.47, 9.24) 0.60+-
evaluation -0.26%, -0.11s invariant (-0.09d, 0.87p, 1.23std) +0.11%, 0.03s invariant (0.03d, 0.96p, 0.82std) +1.00%, 0.03s invariant (0.28d, 0.62p, 0.12std) +0.00%, 0.0ms invariant (0.00d, 1.00p, 0.40std) -6.40%, -0.53ms noisy🤷‍♀️ (-1.01d, 0.09p, 0.52std)
WGLMakie 41.54s (41.35, 41.96) 0.21+- 21.18s (20.99, 21.44) 0.14+- 19.06s (18.87, 19.61) 0.26+- 14.14ms (13.15, 18.87) 2.09+- 1.68s (1.62, 1.78) 0.05+-
master 41.50s (41.32, 41.66) 0.14+- 20.57s (20.37, 20.79) 0.16+- 19.00s (18.84, 19.13) 0.12+- 13.31ms (12.78, 13.75) 0.34+- 1.65s (1.61, 1.68) 0.03+-
evaluation +0.09%, 0.04s invariant (0.21d, 0.70p, 0.17std) +2.88%, 0.61s slower X (4.02d, 0.00p, 0.15std) +0.34%, 0.06s invariant (0.32d, 0.57p, 0.19std) +5.90%, 0.83ms noisy🤷‍♀️ (0.56d, 0.34p, 1.22std) +1.29%, 0.02s invariant (0.52d, 0.36p, 0.04std)

@SimonDanisch SimonDanisch merged commit ef0ded7 into master Mar 31, 2023
@SimonDanisch SimonDanisch deleted the ff/scene_visibility_rerender branch March 31, 2023 09:30
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.

3 participants