From #2317
For every media item selected by the user a WPImageSpan is added to the post. This work is done serially and on the main thread, if there are too many items selected the editor will hang until all the spans are generated. The bitmaps for the WPImageSpans should be generated on a background thread to reduce user impact.
See video