-
Notifications
You must be signed in to change notification settings - Fork 28
[IR-10447] Rework image loading limits on iOS #2070
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
base: dev
Are you sure you want to change the base?
Conversation
…loading-limits-on-iOS
…loading-limits-on-iOS
@@ -710,13 +810,22 @@ const getAllResourcesOfType = (type: ResourceType) => { | |||
return result | |||
} | |||
|
|||
const assetDiscarded = () => { |
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.
is it necessary to have listeners? can't we just react to the discarded
state in ResourceState for each resource?
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.
There's no reactive context in the texture loader to listen to those changes
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.
we can do const reactor = startReactor(() => { ... })
to reactivify a promise, we do it in a few places already
@@ -710,13 +810,22 @@ const getAllResourcesOfType = (type: ResourceType) => { | |||
return result | |||
} | |||
|
|||
const assetDiscarded = () => { |
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.
we can do const reactor = startReactor(() => { ... })
to reactivify a promise, we do it in a few places already
Summary
Adds queries to Resource state around asset memory usage and budgets
Limit concurrent images being loaded
Wait for images to be discarded if over budget before loading
Subtasks Checklist
Breaking Changes
References
closes #insert number here
QA Steps