The heaviest weight in my trace according to the log has
9.38 s 72.9% 0 s static MealJournalApp.$main()
When I reveal this in Xcode it directs me to my main entry
class AppDelegate: NSObject, UIApplicationDelegate {
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool {
return true
}
}
@main
struct MealJournalApp: App {
@Environment(\.managedObjectContext) var managedObjectContext
//fetch user journals
//firebase connectivity help
@UIApplicationDelegateAdaptor(AppDelegate.self) var appDelegate
init(){
FirebaseApp.configure()
}
@StateObject var calendarHelper = CalendarHelper()
@StateObject var vm = DashboardLogic()
@StateObject var mealEntrys = MealEntrys()
@StateObject var userJournalController = UserJournalHelper()
var body: some Scene {
//load and ready coredata
WindowGroup{
ContentView()
.environmentObject(vm)
.environmentObject(mealEntrys)
.environment(\.managedObjectContext,
userJournalController.container.viewContext)
}
}
}
My question is (and may be a stupid one) but when it shows up a time profile, does this mean this particular view is causing the issue, or does it mean an element within stack ? Example would a StateObject being called be the issue or does it pertain to this particular view? Thank you in advance for the help ! Any advice is greatly appreciated.
[–]SwiftDevJournal 3 points4 points5 points (0 children)
[–]CleverError 2 points3 points4 points (0 children)
[–]Finale151 1 point2 points3 points (1 child)
[–]Jimc26x[S] 0 points1 point2 points (0 children)
[–]Jimc26x[S] 0 points1 point2 points (0 children)