Fix #2406 - Load media file in the background#2515
Fix #2406 - Load media file in the background#2515tonyr59h merged 1 commit intowordpress-mobile:developfrom
Conversation
|
@tonyr59h as I'm still learning about the Editor (along with many things), I notice that there are still several cases in |
I don't think there are any other cases that work so heavily so improvements wouldn't be noticeable. This is the only case that adds more than one thing to the editor at a time. |
There was a problem hiding this comment.
A lot of the work is still being done on the main thread. It does seem to load faster and profiling showed a slight improvement of ~7% (decrease in time spent on the main thread) in the one comparison I ran. There is still a noticeable delay if an absurd amount of images are selected but very few people will run into that problem.
Fix #2406 - Load media file in the background
This PR improves how multiple media selection is handled and loaded to the Editor.
Previously, after selecting multiple media, there will be a slight lag experienced as it has been shown by @tonyr59h in #2406.
This PR puts the the media loading task in the background, thus, removing the lag.