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

Debug "Normals of a Cat" #3993

Closed
wants to merge 1 commit into from
Closed

Debug "Normals of a Cat" #3993

wants to merge 1 commit into from

Conversation

ffreyer
Copy link
Collaborator

@ffreyer ffreyer commented Jun 27, 2024

The example doesn't fail for me locally so I'm using this to test

@ffreyer ffreyer added the skip-changelog Skips changelog enforcer label Jun 27, 2024
@MakieBot
Copy link
Collaborator

MakieBot commented Jun 27, 2024

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(fig)
using create display create display
GLMakie 4.22s (4.20, 4.24) 0.02+- 103.53ms (101.98, 104.64) 0.93+- 478.93ms (473.92, 483.71) 3.10+- 8.49ms (8.26, 8.63) 0.15+- 25.55ms (25.50, 25.68) 0.06+-
master 4.24s (4.21, 4.29) 0.03+- 104.27ms (102.21, 108.95) 2.27+- 478.45ms (470.62, 483.87) 4.11+- 8.45ms (8.35, 8.56) 0.08+- 25.49ms (25.42, 25.55) 0.05+-
evaluation 1.00x invariant, -0.01s (-0.51d, 0.36p, 0.03std) 1.01x invariant, -0.74ms (-0.43d, 0.45p, 1.60std) 1.00x invariant, 0.48ms (0.13d, 0.81p, 3.60std) 0.99x invariant, 0.05ms (0.38d, 0.49p, 0.12std) 1.00x invariant, 0.06ms (0.99d, 0.09p, 0.06std)
CairoMakie 4.09s (4.02, 4.17) 0.04+- 115.37ms (112.81, 118.15) 1.74+- 142.19ms (137.57, 149.51) 4.37+- 8.94ms (8.84, 9.03) 0.07+- 1003.53μs (991.17, 1017.05) 10.12+-
master 3.83s (3.80, 3.87) 0.03+- 117.67ms (114.32, 123.67) 3.49+- 144.14ms (138.53, 151.44) 4.27+- 8.87ms (8.69, 9.06) 0.13+- 1006.55μs (994.98, 1014.76) 7.49+-
evaluation 0.94x slower❌, 0.26s (7.11d, 0.00p, 0.04std) 1.02x invariant, -2.3ms (-0.84d, 0.15p, 2.61std) 1.01x invariant, -1.95ms (-0.45d, 0.41p, 4.32std) 0.99x invariant, 0.07ms (0.69d, 0.23p, 0.10std) 1.00x invariant, -3.02μs (-0.34d, 0.54p, 8.81std)
WGLMakie 4.50s (4.40, 4.62) 0.07+- 106.64ms (103.60, 111.81) 2.93+- 9.14s (8.84, 9.67) 0.31+- 10.02ms (9.27, 10.53) 0.57+- 70.45ms (69.44, 71.58) 0.93+-
master 4.46s (4.39, 4.61) 0.07+- 105.56ms (104.11, 109.72) 2.00+- 9.14s (8.96, 9.61) 0.22+- 10.02ms (9.32, 12.69) 1.24+- 70.80ms (69.85, 72.42) 0.85+-
evaluation 0.99x invariant, 0.04s (0.59d, 0.29p, 0.07std) 0.99x invariant, 1.08ms (0.43d, 0.44p, 2.47std) 1.00x invariant, 0.01s (0.03d, 0.96p, 0.26std) 1.00x invariant, -0.0ms (-0.00d, 1.00p, 0.91std) 1.01x invariant, -0.35ms (-0.40d, 0.47p, 0.89std)

@ffreyer
Copy link
Collaborator Author

ffreyer commented Jun 27, 2024

Ok, I found something. The index remapping process in MeshIO doesn't write to normals[1], so it takes on a random value. How that would cause p => p .+ Point(normalize(n) .* 0.05f0) to become [0.0, 0.0, 0.0], [Inf, Inf, Inf] isn't clear to me though, because normalize returns either 0 or NaN with dodgy inputs on my machine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip-changelog Skips changelog enforcer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants