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 warning when zooming in WGLMakie #3224

Merged
merged 2 commits into from
Sep 11, 2023
Merged

Conversation

SimonDanisch
Copy link
Member

This was a weird bug.
This warning popped up on master:

julia> ┌ Warning: Error in window event callback
│   exception =
│    All non scalars need same length, Found lengths for each argument: (5, 4, 1), (Vector{Makie.GlyphCollection}, Vector{Point{3, Float32}}, Quaternion{Float64})
│    Stacktrace:
│      [1] error(s::String)
│        @ Base .\error.jl:35
│      [2] macro expansion
│        @ c:\Users\sdani\Programmieren\MakieMaster\dev\Makie\src\utilities\utilities.jl:209 [inlined]

But:

  • Only appeared for first call to a plotting function when zooming the first time into plot
  • Doesn't appear in GLMakie, even though most of the code is the same
  • seemed to be non fatal as far as I can tell ( i guess it just updated later then)

Anyways, this fixes it and should be more correct!

@MakieBot
Copy link
Collaborator

MakieBot commented Sep 11, 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 11.09s (11.01, 11.15) 0.06+- 1.15s (1.15, 1.17) 0.01+- 812.37ms (781.00, 868.44) 26.79+- 9.69ms (9.56, 9.77) 0.07+- 139.69ms (137.93, 140.64) 0.95+-
master 11.09s (10.91, 11.19) 0.10+- 1.16s (1.14, 1.20) 0.02+- 808.54ms (798.66, 819.72) 9.46+- 9.70ms (9.60, 9.80) 0.08+- 139.39ms (138.41, 140.56) 0.72+-
evaluation +0.01%, 0.0s invariant (0.02d, 0.97p, 0.08std) -0.37%, -0.0s invariant (-0.29d, 0.60p, 0.01std) +0.47%, 3.83ms invariant (0.19d, 0.73p, 18.12std) -0.14%, -0.01ms invariant (-0.18d, 0.75p, 0.08std) +0.21%, 0.29ms invariant (0.35d, 0.53p, 0.83std)
CairoMakie 13.05s (12.96, 13.11) 0.06+- 1.52s (1.50, 1.54) 0.01+- 270.16ms (267.96, 272.67) 1.70+- 12.91ms (12.78, 13.02) 0.08+- 7.62ms (7.51, 7.79) 0.11+-
master 13.07s (12.97, 13.25) 0.10+- 1.52s (1.51, 1.54) 0.01+- 270.62ms (268.03, 273.50) 2.05+- 12.92ms (12.74, 13.12) 0.13+- 7.61ms (7.45, 7.73) 0.11+-
evaluation -0.16%, -0.02s invariant (-0.25d, 0.65p, 0.08std) +0.04%, 0.0s invariant (0.05d, 0.92p, 0.01std) -0.17%, -0.46ms invariant (-0.24d, 0.66p, 1.87std) -0.06%, -0.01ms invariant (-0.07d, 0.90p, 0.10std) +0.12%, 0.01ms invariant (0.08d, 0.88p, 0.11std)
WGLMakie 13.99s (13.67, 14.27) 0.20+- 1.45s (1.42, 1.54) 0.05+- 12.27s (12.04, 12.65) 0.23+- 15.16ms (14.06, 16.05) 0.67+- 1.17s (1.11, 1.23) 0.05+-
master 14.00s (13.73, 14.55) 0.27+- 1.45s (1.41, 1.48) 0.03+- 12.23s (12.03, 12.52) 0.20+- 15.88ms (14.40, 18.35) 1.28+- 1.15s (1.07, 1.23) 0.05+-
evaluation -0.07%, -0.01s invariant (-0.04d, 0.94p, 0.24std) +0.28%, 0.0s invariant (0.11d, 0.85p, 0.04std) +0.30%, 0.04s invariant (0.17d, 0.75p, 0.21std) -4.74%, -0.72ms invariant (-0.70d, 0.22p, 0.98std) +1.69%, 0.02s invariant (0.39d, 0.48p, 0.05std)

@SimonDanisch SimonDanisch merged commit a29ce73 into master Sep 11, 2023
13 checks passed
@SimonDanisch SimonDanisch deleted the sd/fix-wgl-warning branch September 11, 2023 11:32
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.

2 participants