Skip to content

Commit

Permalink
Update Cocoapods.
Browse files Browse the repository at this point in the history
  • Loading branch information
charlesmchen-signal committed Jan 4, 2019
1 parent be04d07 commit c72da46
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Manifest.lock
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ CHECKOUT OPTIONS:
:commit: 3e0c2371d125f2d3db26daa498d5d436961b1795
:git: https://github.com/signalapp/HKDFKit.git
Mantle:
:commit: 86be6280908291114bfacca7b765fe89bd5ca6e2
:commit: 9599b1d9796280c97cb2f786f34984fc98a3b6ef
:git: https://github.com/signalapp/Mantle
SignalCoreKit:
:commit: 2bf143469ab82fb35379fe9f5085450edefb2a2a
Expand Down
13 changes: 12 additions & 1 deletion Mantle/Mantle/MTLJSONAdapter.m
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,18 @@ - (id)modelFromJSONDictionary:(NSDictionary *)JSONDictionary error:(NSError **)e

id model = [self.modelClass modelWithDictionary:dictionaryValue error:error];

return [model validate:error] ? model : nil;
// BEGIN ORM-PERF-2
// Commented out by mkirk as part of ORM perf optimizations.
//
// The validation NSCoding validation reflection used by Mantle is expensive, and
// we've never used it.
// If we later want to use this feature, we'll need to carefully evaluate the perf
// implications on large migrations.
//
// return [model validate:error] ? model : nil;
//
return model;
// END ORM-PERF-2
}

+ (NSDictionary *)valueTransformersForModelClass:(Class)modelClass {
Expand Down
9 changes: 5 additions & 4 deletions Mantle/Mantle/MTLModel.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ typedef enum : NSUInteger {
/// validation
///
/// Returns YES if the model is valid, or NO if the validation failed.
- (BOOL)validate:(NSError **)error;
//- (BOOL)validate:(NSError **)error;

@end

Expand Down Expand Up @@ -137,13 +137,14 @@ typedef enum : NSUInteger {
/// receiver, and invokes it if found. If not found, and `model` is not nil, the
/// value for the given key is taken from `model`.
//- (void)mergeValueForKey:(NSString *)key fromModel:(id<MTLModel>)model;
// END ORM-PERF-1

//
/// Merges the values of the given model object into the receiver, using
/// -mergeValueForKey:fromModel: for each key in +propertyKeys.
///
/// `model` must be an instance of the receiver's class or a subclass thereof.
- (void)mergeValuesForKeysFromModel:(id<MTLModel>)model;
//- (void)mergeValuesForKeysFromModel:(id<MTLModel>)model;
//
// END ORM-PERF-1

/// The storage behavior of a given key.
///
Expand Down

0 comments on commit c72da46

Please sign in to comment.