ClippingPolygon immutable positions (performance) - #13665
Open
mzschwartz5 wants to merge 5 commits into
Open
Conversation
This was referenced Aug 3, 2026
Contributor
|
Thank you for the pull request, @mzschwartz5! ✅ We can confirm we have a CLA on file for you. |
mzschwartz5
marked this pull request as ready for review
August 5, 2026 15:47
mzschwartz5
force-pushed
the
clipping-polygon-holes
branch
from
August 10, 2026 19:39
e2f9d8f to
a2cf88a
Compare
mzschwartz5
force-pushed
the
clipping-polygons-performance
branch
from
August 10, 2026 19:39
46d6579 to
82ea5e7
Compare
danielzhong
reviewed
Aug 12, 2026
danielzhong
left a comment
Member
There was a problem hiding this comment.
Don't forget to add CHANGES.md later!
mzschwartz5
force-pushed
the
clipping-polygon-holes
branch
from
August 18, 2026 17:20
a2cf88a to
c54c525
Compare
mzschwartz5
force-pushed
the
clipping-polygons-performance
branch
from
August 18, 2026 17:20
82ea5e7 to
8ef925c
Compare
mzschwartz5
force-pushed
the
clipping-polygon-holes
branch
from
August 18, 2026 17:28
c54c525 to
15b8f39
Compare
mzschwartz5
force-pushed
the
clipping-polygons-performance
branch
from
August 18, 2026 17:28
8ef925c to
d34e4bd
Compare
mzschwartz5
force-pushed
the
clipping-polygon-holes
branch
from
August 19, 2026 17:08
15b8f39 to
0e904c0
Compare
mzschwartz5
force-pushed
the
clipping-polygons-performance
branch
from
August 19, 2026 17:08
d34e4bd to
398a04a
Compare
mzschwartz5
force-pushed
the
clipping-polygon-holes
branch
from
August 19, 2026 19:38
0e904c0 to
86de2b8
Compare
mzschwartz5
force-pushed
the
clipping-polygons-performance
branch
from
August 19, 2026 19:38
398a04a to
f96ec81
Compare
mzschwartz5
force-pushed
the
clipping-polygon-holes
branch
from
August 19, 2026 20:00
86de2b8 to
589af27
Compare
mzschwartz5
force-pushed
the
clipping-polygons-performance
branch
2 times, most recently
from
August 19, 2026 20:48
815b46e to
843b8ae
Compare
mzschwartz5
force-pushed
the
clipping-polygon-holes
branch
from
August 20, 2026 12:50
25d6e02 to
434e171
Compare
mzschwartz5
force-pushed
the
clipping-polygons-performance
branch
from
August 20, 2026 12:50
843b8ae to
e626f94
Compare
mzschwartz5
force-pushed
the
clipping-polygon-holes
branch
from
August 20, 2026 14:17
434e171 to
c50ae6f
Compare
mzschwartz5
force-pushed
the
clipping-polygons-performance
branch
from
August 20, 2026 14:17
e626f94 to
4e05529
Compare
mzschwartz5
force-pushed
the
clipping-polygon-holes
branch
from
August 20, 2026 14:33
c50ae6f to
3c04c7d
Compare
mzschwartz5
force-pushed
the
clipping-polygons-performance
branch
2 times, most recently
from
August 20, 2026 15:11
ef62eb2 to
9c78dc8
Compare
plainheart
reviewed
Aug 20, 2026
| result, | ||
| deprecationWarning( | ||
| "ClippingPolygon.computeRectangle", | ||
| "ClippingPolygon.computeRectangle is deprecated as of CesiumJS 1.144 and will be removed in 1.146. Use the ClippingPolygon.rectangle property instead.", |
Contributor
There was a problem hiding this comment.
I noticed a small typo in the deprecation message. ClippingPolygon.computeRectangle should be deprecated as of version 1.145 instead of 1.144, since 1.144 is already released.
mzschwartz5
force-pushed
the
clipping-polygon-holes
branch
from
August 21, 2026 16:14
3c04c7d to
1bb2726
Compare
mzschwartz5
force-pushed
the
clipping-polygons-performance
branch
from
August 21, 2026 16:14
9c78dc8 to
5f65c7a
Compare
mzschwartz5
force-pushed
the
clipping-polygon-holes
branch
from
August 21, 2026 16:16
1bb2726 to
6ff03a6
Compare
mzschwartz5
force-pushed
the
clipping-polygons-performance
branch
from
August 21, 2026 16:16
5f65c7a to
b9e7100
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Inspired by #13273 (which has drifted significantly in light of the new clipping polygon implementation this PR builds on). This PR makes the positions of
ClippingPolgyonsimmutable (which is a breaking change!). The reason: if we can guarantee these positions do not change, we can get rid of dirty checks that occur per-vertex-per-frame. These checks are expensive for large collections (and at the high frequency of 60+ FPS). Instead, users can remove-and-readd (new) polygons. This isn't cheap (requires texture rebakes), but it's at least explicit / easier to detect (and respond to once rather than 60 times a second).The original PR didn't quite land on a consensus of how to implement this. See my comment here on how I've decided to approach it.
Issue number and link
Part of #12258
Testing plan
This sandcastle (link is for this branch), is good for testing. It allows you to vary polygon count and polygon vertex count. Try it here and on main and compare the FPS -- it should be a pretty obvious difference.
Author checklist
CONTRIBUTORS.mdCHANGES.mdwith a short summary of my changeAI acknowledgment
If yes, I used the following Tools(s) and/or Service(s):
If yes, I used the following Model(s):
PR Dependency Tree
This tree was auto-generated by Charcoal