-
Notifications
You must be signed in to change notification settings - Fork 121
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
Add promise queueing to try and make batch operations faster #2690
Conversation
I’ll let Akash and Micheal have proper opinions, but just a quation from a village idiot: which batch operations does this apply to? Uploads? Metadata editing? Deletions? Only through UI or mediaAPI too? |
Just in the UI, and afaict, all of the above as I changed the helper that appears used in all of those places. JS is very good at queuing a far larger number of promises concurrently than it's able to deliver on. |
Looking forward to test batch operations on TEST, then 👏 . |
54698fa
to
d00b3fd
Compare
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.
💯 Great to get this in, definitely the next step after the original work to track batch operations
Not a huge fan of the linter-change-noise in the diff but LGTM
error.body && error.body.errorMessage || 'unknown'; | ||
const message = | ||
reason === "unsupported-type" | ||
? "The Grid only supports JPG and PNG images." + |
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.
Unrelated but does this message need changing now TIFF support has been added? cc @paperboyo
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.
Thanks for review, @mbarton! Yeah, also seen it, but TIFF support hasn’t been advertised yet. Reasoning (not too strong, I admit) being outstanding work in this.
… remove data url on upload)
@mbarton yeah, sorry, not sure how to fix that :( |
What does this change?
This will only allow two batch operations or image uploads to run concurrently. I've used this pattern a few times to fix similar problems so am hopeful it'll help things.
How can success be measured?
Increased performance when running batch jobs.
Screenshots (if applicable)
Who should look at this?
@akash1810 @paperboyo @mbarton
Could also do with a hand spinning up grid locally or on test to test this.
Tested?