Early Materialization (ARCH9056)
Esta página aún no está disponible en tu idioma.
Key swift.orm.early-materialization · Severity warning · Category orm
Flags fetched results filtered / sorted in memory (try context.fetch(r).filter { }) when the fetch request could carry the predicate.
Incorrect
Section titled “Incorrect”let active = try context.fetch(request).filter { $0.active }Correct
Section titled “Correct”request.predicate = NSPredicate(format: "active == YES")Put the predicate and sort descriptors on the fetch request.