optimizely/objective-c-sdk

Synchronous Save Event to Database Causes Poor Performance

Closed this issue · 2 comments

- (BOOL)saveEvent:(nonnull NSDictionary *)data
eventType:(nonnull NSString *)eventTypeName
error:(NSError * _Nullable __autoreleasing * _Nullable)error
{
return [self.database saveEvent:data table:eventTypeName error:error];
}

Synchronously saving events is causing poor performance when requesting events quickly. It has caused me to instead cache the data after it has been fetched once. It seems odd that this isn't an asynchronous save to the database considering the response is only logged and not needed at the time of processing.

Thanks for raising this. We'll look into it and get back to you.

This is fixed in the 3.0 sdk release.