-
Notifications
You must be signed in to change notification settings - Fork 22
CoreData Date issues #297
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CoreData Date issues #297
Conversation
Reducing thread switching when adding and updating objects into CoreData
Dependency ReviewThe following issues were found:
License IssuesPackage.resolved
OpenSSF Scorecard
Scanned Files
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #297 +/- ##
==========================================
- Coverage 88.63% 88.60% -0.03%
==========================================
Files 461 461
Lines 31675 31749 +74
==========================================
+ Hits 28074 28132 +58
- Misses 3601 3617 +16
🚀 New features to boost your workflow:
|
@@ -138,7 +138,9 @@ public class CoreDataWrapper { | |||
} | |||
|
|||
do { | |||
try context.save() | |||
if context.hasChanges { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should help fix high disk writes and cpu reported by Apple as well, but not completely.
I think the real fix here is putting everything behind the performOperation and this way we don't cause any race conditions so I'd prefer if we didn't add the default values, or the hasChanges so that we can really know what fixes the issue. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This PR attempts to address the crash we've seen regarding non-optional Dates in CoreData.