-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
Remote entity reservation v2 #18266
Open
ElliottjPierce
wants to merge
37
commits into
bevyengine:main
Choose a base branch
from
ElliottjPierce:remote-entity-reservation-v2
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+610
−312
Open
Remote entity reservation v2 #18266
Changes from 26 commits
Commits
Show all changes
37 commits
Select commit
Hold shift + click to select a range
0278c77
sketched balancing
ElliottjPierce da541a0
decided on a data patern
ElliottjPierce 279a5ae
reservations
ElliottjPierce 8ca72cd
finished data needed
ElliottjPierce 95bf141
flushing
ElliottjPierce 95d86e1
figured out allocation
ElliottjPierce 7ee4814
figured out free
ElliottjPierce 415d87f
clearing and reservation
ElliottjPierce eb6859d
fixed more methods
ElliottjPierce 5f587c4
sorted out lengths
ElliottjPierce c77f21a
roughly fixed alloc_at
ElliottjPierce 160591c
cleaned up remaining missing pieces
ElliottjPierce 0981b77
improved alloc_at quality
ElliottjPierce 309aaae
rename
ElliottjPierce 3f783f1
created remote interface
ElliottjPierce 02d823e
correctness and docs pass
ElliottjPierce 294142a
doc changes
ElliottjPierce 35c5c81
preserve generation when marking dont flush
ElliottjPierce dc36429
fixed one test case ish
ElliottjPierce 281f5b9
fixed typo
ElliottjPierce 28ae3e2
fixed more tests
ElliottjPierce e145c3d
removed flushed assert
ElliottjPierce 7fd1774
Safety comment rational
ElliottjPierce 34065dc
fixed many tests
ElliottjPierce b57fefb
fixed ordering problems in tests
ElliottjPierce a8defe3
Fixed wrong tests
ElliottjPierce 75ff44a
roll reserve_generations into freeing
ElliottjPierce b2b9705
bench in increments of allocation batch size
ElliottjPierce 3db2fb8
improve reservation performance
ElliottjPierce d62f2c2
fix a test
ElliottjPierce 622abb3
fix doc
ElliottjPierce 145c3b6
Merge branch 'main' into remote-entity-reservation-v2
ElliottjPierce 6c249b7
fixed dynamic scene tests
ElliottjPierce fede71c
fixed hardcoded serialized entities
ElliottjPierce d890692
redid the serializing test
ElliottjPierce 6c3eb46
Merge branch 'remote-entity-reservation-v2' of https://github.com/Ell…
ElliottjPierce aa830e2
Tiny docs correction
ElliottjPierce File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd like to see this expanded to explain why it exists.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Basically, when we reserve
Entity
s fromEntityReservations
forEntities::owned
, we don't want to flush them like normal. They haven't been requested yet, so the flush doesn't make sense, and when they are requested byEntities::alloc
, the caller will be the one toEntities::set
theEntityLocation
.In principal, we could just have a
HashSet
ofEntity
s that have been inEntities::owned
since the last flush, but that lookup takes time and memory.Instead, by keeping a special
EntityLocation::INVALID_BUT_DONT_FLUSH
, we can determine whether or not to flush based only on ifmeta.location == EntityLocation::INVALID
or not.Hopefully that makes sense. This is complicated.