Compositor
Compositor copied to clipboard
Do the heavy lifting of document loading on a background queue
DocumentModel.load()
currently calls SourceModel.load()
on the main queue; this may cause UI hangs.
Dispatch the work to a background queue and introduce a completion closure.
Edit: maybe also look into https://developer.apple.com/documentation/appkit/nsdocument/1515216-canconcurrentlyreaddocuments
CRing.tex is an example of a large document that causes a longer hang when opening.