Large json decoding to swiftdata

Hi all, currently my app is running into a problem with large json decoding to swiftdata.

My app works by decoding my json files (~10,000 items) into my swiftdata db on the first launch, but it is either extremely slow (30 seconds) when done thread safe, or done with concurrency which leads to data races and app crashes for some users.

Can anyone lead me down the right path to creating a better user experience for this scenario? Is a prepopulated swiftdata db the best option?

Unfortunately i didnt know this was possible before releasing my app, so i would assume if i made a change to this it would reset the users current local storage.

TLDR: whats the best way to have a large amount of data put in a swiftdata db without super slow json serialization?

Update: the json serializing at runtime was simply a bad idea and any fix for it seems more complicated than just integrating grdb and using preloaded sqlite files.

Thanks