Hacker News new | ask | show | jobs
by samnardoni 4202 days ago
Why not profile and see where the time is actually going? Slow JSON parsing? Slow I/O?
1 comments

Blog author here. I actually did: the vast majority of time is spent in the Swift Runtime. The JSON parsing is via NSJSONSerialization, which is an Apple library written in Objective-C, and it's fast. I'm not measuring IO, I'm only measuring the time spent turning the NSDictionary objects that come back from NSJSONSerialization into my model objects.

I didn't spend a huge amount of time profiling this though, since it's very early days in my project and it'd take me less time to just rewrite what I'd done so far in a language that I know works.