-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Launch network background queue #961
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
Conversation
It improves image download and rendering time by about 2% on our surfaces when the main thread is under heavy load.
c4b6a62 to
e56dd7b
Compare
|
🚫 CI failed with log |
|
🚫 CI failed with log |
Generated by 🚫 Danger |
|
🚫 CI failed with log |
nguyenhuy
left a comment
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.
Nice!
maicki
left a comment
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'm not pretty sure about dispatching to a global queue. As we saw in the past this can easily result in over committing and thread explosion. I would be in favor to start a new experiment to use a dedicated serial queue callback queue (like NSURLSession callback does for example) to prevent this and see how the performance results are for this. Furthermore this would give us more control about qos / priorities.
Adlai-Holler
left a comment
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.
Michael's right – if we dispatch to a global queue, it's actually possible to get progress images out of order.
A serial queue, or pool of serial queues where we pick one for each node, would be better.
|
I'm going to close this, I don't remember why this got opened in the first place as this was essentially merged separately: #1369 I think you all are right though that these callbacks should be dispatched on a serial queue… |
It improves image download and rendering time by about 2% on our surfaces when the main thread is under heavy load.