forked from karelia/iMedia
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Mitigate karelia#90, Accessing the root node of a Photos library for …
…the first time within an app session takes very long for large libraries When dispatching requests to the parsers via SBPerformSelectorAsync() We would prefer the more comfortable NSOperationQueue over dispatch_async()/dispatch_semaphore_... but it turns out that requesting a root media group in the context of the AppleMediaLibraryParser takes about twice as long compared to dispatch_async() and thus accounts for the vast majority of the time spent to "open" a an Apple Media Library framework based library. I know this sounds crazy but our measurements regarding the matter are unambiguous (as of 2017/02/07). We still keep the alternate NSOperationQueue implementation for future use in case our observations render no longer relevant.
- Loading branch information
Showing
1 changed file
with
110 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters