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 repeated rendering with invisible objects #2437

Merged
merged 2 commits into from Nov 23, 2022

Conversation

ffreyer
Copy link
Collaborator

@ffreyer ffreyer commented Nov 23, 2022

Description

Fixes comment in #2336

An invisible object currently never resets it update requests. The pr fixes that. (Going from visible -> invisible needs to trigger a render, so the request needs to be true for an object that just became visible. We then need to reset every objects request, whether they rendered (are visible) or not.)

Type of change

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

@MakieBot
Copy link
Collaborator

MakieBot commented Nov 23, 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 34.32s (33.92, 34.73) 0.32+- 20.45s (20.05, 21.07) 0.37+- 19.26s (18.89, 19.69) 0.28+- 15.48ms (15.19, 15.63) 0.15+- 59.76ms (58.31, 62.98) 1.59+-
master 34.13s (33.86, 34.46) 0.18+- 20.58s (20.34, 20.76) 0.14+- 19.32s (19.03, 19.59) 0.20+- 15.49ms (15.13, 16.04) 0.30+- 60.78ms (59.91, 61.60) 0.68+-
evaluation +0.55%, 0.19s invariant (0.72d, 0.21p, 0.25std) -0.64%, -0.13s invariant (-0.47d, 0.40p, 0.25std) -0.31%, -0.06s invariant (-0.25d, 0.65p, 0.24std) -0.04%, -0.01ms invariant (-0.02d, 0.96p, 0.23std) -1.70%, -1.02ms invariant (-0.83d, 0.16p, 1.14std)
CairoMakie 32.93s (32.64, 33.51) 0.33+- 22.52s (22.15, 23.06) 0.31+- 3.24s (3.11, 3.32) 0.07+- 20.71ms (20.34, 22.01) 0.64+- 1.87ms (1.85, 1.89) 0.02+-
master 33.30s (32.87, 33.89) 0.37+- 22.67s (22.25, 23.30) 0.32+- 3.28s (3.22, 3.44) 0.08+- 20.28ms (20.02, 20.56) 0.18+- 1.88ms (1.87, 1.89) 0.01+-
evaluation -1.11%, -0.36s invariant (-1.04d, 0.08p, 0.35std) -0.64%, -0.15s invariant (-0.46d, 0.41p, 0.32std) -1.12%, -0.04s invariant (-0.50d, 0.37p, 0.07std) +2.08%, 0.43ms invariant (0.92d, 0.13p, 0.41std) -0.21%, -0.0ms invariant (-0.34d, 0.54p, 0.01std)
WGLMakie 32.26s (31.89, 32.48) 0.20+- 25.70s (25.52, 25.81) 0.10+- 41.42s (41.16, 41.63) 0.20+- 17.69ms (17.15, 18.21) 0.42+- 116.31ms (107.41, 136.32) 9.53+-
master 31.91s (31.56, 32.04) 0.17+- 25.60s (25.33, 25.70) 0.13+- 41.65s (41.41, 42.04) 0.21+- 16.75ms (16.26, 17.38) 0.38+- 93.18ms (78.56, 126.29) 16.37+-
evaluation +1.09%, 0.35s slower X (1.87d, 0.00p, 0.19std) +0.40%, 0.1s invariant (0.88d, 0.13p, 0.11std) -0.56%, -0.23s invariant (-1.14d, 0.05p, 0.20std) +5.33%, 0.94ms slower❌ (2.35d, 0.00p, 0.40std) +19.89%, 23.13ms slower❌ (1.73d, 0.01p, 12.95std)

@ffreyer
Copy link
Collaborator Author

ffreyer commented Nov 23, 2022

WARNING: Makie.MakieLayout is deprecatedThe module MakieLayout has been removed and integrated into Makie, so simply replace all usage of MakieLayout with Makie.
likely near none:1
WARNING: importing deprecated binding Makie.MakieLayout into GLMakie.

?

libGL error: MESA-LOADER: failed to open swrast: /usr/lib/dri/swrast_dri.so: cannot open shared object file: No such file or directory (search paths /usr/lib/x86_64-linux-gnu/dri:$${ORIGIN}/dri:/usr/lib/dri, suffix _dri)
libGL error: failed to load driver: swrast
┌ Warning: GLFW couldn't create an OpenGL window.
│ This likely means, you don't have an OpenGL capable Graphic Card,
│ or you don't have an OpenGL 3.3 capable video driver installed.
│ Have a look at the troubleshooting section in the GLMakie readme:
https://github.com/MakieOrg/Makie.jl/tree/master/GLMakie#troubleshooting-opengl.
└ @ GLMakie ~/work/Makie.jl/Makie.jl/GLMakie/src/screen.jl:224
ERROR: LoadError: LoadError: GLFWError (VERSION_UNAVAILABLE): GLX: Failed to create context: GLXBadFBConfig

And the GLFW error?

@SimonDanisch
Copy link
Member

GLFW error is this: #2439

WARNING: importing deprecated binding Makie.MakieLayout into GLMakie.

I don't think we can avoid this until we remove the Base.@deprecate_binding MakieLayout Makie true ... Which I guess we decided not to for a while 🤷

@SimonDanisch SimonDanisch merged commit 4ce6ba3 into master Nov 23, 2022
@SimonDanisch SimonDanisch deleted the ff/render_on_demand_fix branch November 23, 2022 12:40
t-bltg pushed a commit to t-bltg/Makie.jl that referenced this pull request Dec 31, 2022
Co-authored-by: Simon <sdanisch@protonmail.com>
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