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

WebGL matrix performance fix #5072

Merged
merged 14 commits into from
Nov 25, 2024
Merged

Conversation

kubapelc
Copy link
Collaborator

Fixes #5070 by passing float32 matrices to WebGL instead of float64. Note that the performance degradation only seemed to affect Chrome, not Firefox. Updates relevant unit & render tests.

@kubapelc
Copy link
Collaborator Author

kubapelc commented Nov 19, 2024

It would be nice to also have some hard perf numbers for this from a benchmark. I will see if there is a benchmark that can catch this and try to post some numbers tomorrow.

@ibesora
Copy link
Collaborator

ibesora commented Nov 19, 2024

Nice work and quick fix!
Is there anything we should be wary of by going back to 32-bit matrices? What was the rationale on changing those to 64?

@HarelM
Copy link
Collaborator

HarelM commented Nov 19, 2024

Added a small question around object creation...
Looks good otherwise.

@kubapelc
Copy link
Collaborator Author

Firefox benchmark:

Firefox

Chrome:

Chrome

It seems that the float32 fix works, but there is still a performance regression somewhere.

@HarelM
Copy link
Collaborator

HarelM commented Nov 20, 2024

Codecov is not running on PRs lately for somereason, I'll see if I can make it work again.
Otherwise I left a few minor comments.

…ix-fix

# Conflicts:
#	src/geo/projection/globe_transform.ts
#	src/geo/projection/mercator_utils.ts
#	test/integration/render/tests/projection/globe/terrain/fill-planet-pole/expected-windows-flaky.png
Copy link

codecov bot commented Nov 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.80%. Comparing base (17f04d7) to head (010b367).
Report is 6 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5072      +/-   ##
==========================================
- Coverage   91.81%   91.80%   -0.02%     
==========================================
  Files         279      279              
  Lines       38332    38340       +8     
  Branches     6698     6698              
==========================================
+ Hits        35195    35197       +2     
- Misses       3005     3009       +4     
- Partials      132      134       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


🚨 Try these New Features:

Copy link
Collaborator

@HarelM HarelM left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

THANKS!

@HarelM HarelM merged commit 30ab703 into maplibre:main Nov 25, 2024
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Performance degradation in render time in 5.0.0 version
3 participants