Skip to content

Commit 6dc7fb3

Browse files
committed
small changes
1 parent 67248f9 commit 6dc7fb3

File tree

3 files changed

+2
-39
lines changed

3 files changed

+2
-39
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
*~.nib
44

55
build/
6+
xcuserdata/
67

78
*.pbxuser
89
*.perspective

Common/Classes/HKDataStore.m

-38
Original file line numberDiff line numberDiff line change
@@ -431,19 +431,8 @@ - (void)setup
431431

432432
#pragma mark Notifications
433433

434-
#ifdef HK_DEBUG_PROFILE
435-
static int32_t gHKDataStoreTimeTaken = 0;
436-
#endif
437-
438434
- (void)managedObjectContextDidChange:(NSNotification *)notification
439435
{
440-
#ifdef HK_DEBUG_PROFILE
441-
NSDate *s, *e;
442-
int32_t time;
443-
444-
s = [NSDate date];
445-
#endif
446-
447436
@synchronized (self)
448437
{
449438
NSDictionary *ui = [notification userInfo];
@@ -477,27 +466,10 @@ - (void)managedObjectContextDidChange:(NSNotification *)notification
477466
}];
478467
}
479468
}
480-
481-
#ifdef HK_DEBUG_PROFILE
482-
e = [NSDate date];
483-
484-
time = (int32_t) (([e timeIntervalSinceDate:s]) * 1e6);
485-
486-
OSAtomicAdd32Barrier( time, &gHKDataStoreTimeTaken );
487-
488-
NSLog(@"HKDataStore::managedObjectContextDidChange->Total time taken: %d usec", gHKDataStoreTimeTaken);
489-
#endif
490469
}
491470

492471
- (void)managedObjectContextDidSave:(NSNotification *)notification
493472
{
494-
#ifdef HK_DEBUG_PROFILE
495-
NSDate *s, *e;
496-
int32_t time;
497-
498-
s = [NSDate date];
499-
#endif
500-
501473
@synchronized (self)
502474
{
503475
NSDictionary *ui = [notification userInfo];
@@ -531,16 +503,6 @@ - (void)managedObjectContextDidSave:(NSNotification *)notification
531503
}];
532504
}
533505
}
534-
535-
#ifdef HK_DEBUG_PROFILE
536-
e = [NSDate date];
537-
538-
time = (int32_t) (([e timeIntervalSinceDate:s]) * 1e6);
539-
540-
OSAtomicAdd32Barrier( time, &gHKDataStoreTimeTaken );
541-
542-
NSLog(@"HKDataStore::managedObjectContextDidSave->Total time taken: %d usec", gHKDataStoreTimeTaken);
543-
#endif
544506
}
545507

546508
- (void)detachedManagedObjectContextDidSave:(NSNotification *)notification

0 commit comments

Comments
 (0)