3
b2plane
157d

💧

There was a 1 second delay when loading images on home page with a bunch of hot model babes in a masonry grid

Why? 💧💧

Maybe pagination is fucked. Lets reduce it from 100 per page to 10.

Still same shit.

What do you think why this could be?

Comment below 👇 right now

(The images im loading are just dummy images from unsplash)

I tried using rxjs. Observables. Flatmaps. Custom array push. Array loop. Change detection to update UI. Chatgpt.

Nothing

Every time i switch tab and come back then theres another second of delay with blank page before content appears

Wtf???

Turns out -- unsplash api was returning me 6K to 8K Fucking images. HEAVY. HEAVY FUCKING IMAGES. and i was apparently displaying 6000x8000 px images, 20 times per page. Thats a lot of fucking pixels! I reduced it with ?w=500 in unsplash api at the end and magically there is no delay now and everything works in an instant.

Fuck off

Comments
  • 2
    Do binary search - split the path halfway and measure latency there.

    I.E. Make a distinction whether the db/file fetch is slow, processing of data is lagging, sending to front or rendering is the bottleneck
  • 0
    I'm now wondering if I'm rare for typically monitoring the data flow of basically anything I make, from nearly inception...
  • 0
    you dumbass. You could have informed your manager about the load times of that page and asked for 6-8 hours to "optimize" it.

    You could've taken a rest to complete it and still be the hero in your manager's eyes.
  • 0
    @SidTheITGuy i work alone
  • 0
    @b2plane did you find a job yet?
  • 0
Add Comment