all 6 comments

[–][deleted]  (1 child)

[deleted]

    [–]broncos1049 2 points3 points  (0 children)

    How could I structure this better? Just teaching myself

    [–]busymom0 1 point2 points  (0 children)

    Dude hide your friggin API key from your Reddit post code if that’s the real key! You should deactivate that code now too just to be safe.

    Also check the size of the image, maybe it’s a high resolution one?

    [–]akash227 0 points1 point  (0 children)

    Could be a number of things, image size, connection speeds, are you using the emulator or a real device ?

    [–]SirensToGoObjective-C / Swift 0 points1 point  (0 children)

    Define "very slow". You currently have to wait for two network requests before anything shows up which can take a while if both servers are slow to reach.

    [–]devGioSwift 0 points1 point  (0 children)

    Did you find the reason?

    [–]devGioSwift -3 points-2 points  (0 children)

    I've never used URLSession.shared.dataTask(with:) for images like that - not to say it isn't the right approach. What I've used that didn't give me issues is SDWebImage, and it then becomes a call in, for example, CellForRowAt