yepher/CoreDataUtility — pull request #38 by jpage4500 (2014-11-12 18:16:51+00:00)
Title: Speed fixes

(NOTE: I tried to use a new branch thinking you could accept both pull requests separately but it looks like this one has the other's changes in it too.. so, I guess just use this one instead). Changes include:
- fix column sorting including:
* nil objects are sorted above non-nil objects
* NSDate column sorting will compare NSDate objects directly
* NSNumber column sorting compares NSNumber objects directly
* NSSet/NSArray/NSData objects are sorted according to their size (count or length)
* no need to create NSString objects anymore for non-string column types
- try to improve performance of loading & displaying data: …
* remove duplicate call to loadEndityDataAtIndex (assume this was on accident - app appears to work fine w/out it)
* remove try/catch logic but still make sure we don't access invalid index (assuming this caused the exception seen before but will keep testing)
* return tableView:heightOfRow
* enable Core Animation (see http://stackoverflow.com/questions/19962721/why-might-an-nstableview-redraw-every-cell-on-scroll); seems to have a nice speed improvement from my testing so far
* log time taken in main thread when you select a row.. still seeing up to 3 secs at times (was 7+ secs) so more needs to be done on background thread
- don't set min column size so user can reduce a column with a long title but short data
- fix the long delay/spinner when selecting tables: …
* [NSTableView removeColumns] method was taking a LONG time to return - clearing the data first and then removing the columns made a big difference.
* also, reload table view (2nd time) after allowing main thread to return. user will see a faster table selection & an empty table view - then data will populate