Post

Replies

Boosts

Views

Activity

Reply to Sudden Drop in CPU Utilization in macOS App After Extended Operation
Thanks for the answer. In fact, even when my app is working on other programs simultaneously after the contention, it feels smooth (I'm currently thinking that this is simply a difference in CPU usage). So it wouldn't be a good idea to intentionally induce contention, and thus low share, would it? I think it's dangerous to approach the problem with this mindset, because a lower share simply feels "good". But even if I solve the contention problem, I'm also feel its hard to solve the high CPU utilization problem in more ways. It's a tough problem, but at the same time, I feel like I need to solve the contention problem first. Thanks for the good advice.
Sep ’23
Reply to SwiftData Migration Error: Missing Attribute Values on Mandatory Relationship
The core of the problem was not properly handling the textSettings property during migration. To solve this, I made the TextSetting (newly added in SchemaV2) in the model to optional. extension SchemaV1 { @Model public final class FSViz { @Attribute(.unique) public let id: UUID public var textColor: TextColor init(textColor: TextColor) { self.id = UUID() self.textColor = textColor } } } extension SchemaV2 { @Model public final class FSViz { @Attribute(.unique) public let id: UUID public var textSettings: TextSetting? init(textSettings: TextSetting) { self.id = UUID() self.textSettings = textSettings } } } Rather than go into more detail, I hope you might this answer helpful.
Feb ’24