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

More render on demand fixes #2929

Merged
merged 6 commits into from May 9, 2023
Merged

More render on demand fixes #2929

merged 6 commits into from May 9, 2023

Conversation

ffreyer
Copy link
Collaborator

@ffreyer ffreyer commented May 6, 2023

Description

I kind of forgot about this. There are still a bunch of things in Scene that change the visuals, but do not trigger rerendering:

  • clear which I also changed to an Observable for this
  • backgroundcolor
  • lighting. Though we can't react to push!ing into a Vector...
  • visible
  • scene insertion (Scene(parent, ...) doesn't insert the scene, but when it is actually inserted it should trigger a re-render.)
  • SSAO changes

px_area seems to be unnecessary but I don't understand why. With

scene = Scene(resolution = (800, 600))
s = Scene(
    scene, 
    clear = true,
    backgroundcolor = :orange,
    px_area = map(r -> Rect2i(div.(widths(r), 4)[1], 50, div.(widths(r), 2)...), scene.px_area)
)
scene

the colored area is the same when resizing, whether it triggers a re-render or not.

Type of change

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

Checklist

  • Added an entry in NEWS.md (for new features and breaking changes)
  • Added or changed relevant sections in the documentation
  • Added unit tests for new algorithms, conversion methods, etc.
  • Added reference image tests for new plotting functions, recipes, visual options, etc.

@MakieBot
Copy link
Collaborator

MakieBot commented May 6, 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 42.89s (41.91, 43.49) 0.55+- 20.60s (20.21, 20.90) 0.25+- 18.82s (18.53, 19.30) 0.28+- 12.80ms (12.59, 13.04) 0.18+- 159.71ms (154.84, 163.63) 2.85+-
master 43.14s (42.12, 44.07) 0.68+- 20.69s (20.31, 20.93) 0.22+- 18.85s (18.50, 19.32) 0.30+- 12.76ms (12.28, 13.05) 0.28+- 159.65ms (153.38, 163.10) 3.50+-
evaluation -0.60%, -0.26s invariant (-0.42d, 0.45p, 0.61std) -0.41%, -0.09s invariant (-0.36d, 0.52p, 0.24std) -0.17%, -0.03s invariant (-0.11d, 0.84p, 0.29std) +0.30%, 0.04ms invariant (0.16d, 0.76p, 0.23std) +0.03%, 0.05ms invariant (0.02d, 0.98p, 3.17std)
CairoMakie 40.46s (39.76, 41.20) 0.50+- 20.99s (20.54, 21.72) 0.40+- 3.01s (2.82, 3.15) 0.11+- 13.33ms (11.37, 14.14) 0.93+- 6.54ms (5.46, 7.25) 0.54+-
master 40.14s (36.05, 42.22) 1.95+- 20.47s (18.96, 21.94) 1.09+- 2.93s (2.62, 3.07) 0.15+- 13.35ms (11.59, 14.01) 0.82+- 6.82ms (5.96, 7.20) 0.40+-
evaluation +0.79%, 0.32s invariant (0.22d, 0.69p, 1.23std) +2.48%, 0.52s invariant (0.63d, 0.27p, 0.75std) +2.60%, 0.08s invariant (0.60d, 0.28p, 0.13std) -0.19%, -0.02ms invariant (-0.03d, 0.96p, 0.87std) -4.25%, -0.28ms invariant (-0.58d, 0.30p, 0.47std)
WGLMakie 51.03s (50.75, 51.19) 0.14+- 25.50s (25.21, 25.76) 0.16+- 25.51s (25.23, 26.24) 0.36+- 17.59ms (16.71, 19.42) 0.94+- 952.33ms (928.92, 982.59) 20.10+-
master 51.27s (50.99, 51.49) 0.19+- 25.53s (25.33, 25.81) 0.18+- 25.55s (25.43, 25.66) 0.09+- 17.37ms (16.75, 17.93) 0.42+- 950.96ms (923.75, 992.26) 26.40+-
evaluation -0.46%, -0.23s faster ✓ (-1.39d, 0.02p, 0.17std) -0.11%, -0.03s invariant (-0.17d, 0.76p, 0.17std) -0.14%, -0.04s invariant (-0.14d, 0.80p, 0.22std) +1.22%, 0.21ms invariant (0.30d, 0.59p, 0.68std) +0.14%, 1.36ms invariant (0.06d, 0.92p, 23.25std)

@SimonDanisch SimonDanisch merged commit 1a5309b into master May 9, 2023
14 checks passed
@SimonDanisch SimonDanisch deleted the ff/render_on_demand branch May 9, 2023 08:52
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