Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Our gif proxying sucks #444

Closed
huumn opened this issue Aug 27, 2023 · 5 comments
Closed

Our gif proxying sucks #444

huumn opened this issue Aug 27, 2023 · 5 comments
Assignees
Labels

Comments

@huumn
Copy link
Member

huumn commented Aug 27, 2023

The majority of gifs people share timeout while being processed by the proxy. The UX is abysmal:

  • nothing shows for 10+ seconds
  • the viewer scrolls or navigates elsewhere
  • if they sit there we timeout and then it loads

I've given our containers more memory and cpu in the hopes that that improves things but it'd be nice to have something that works reliabely.

@huumn huumn added the bug label Aug 27, 2023
@SatsAllDay
Copy link
Contributor

Is it just because of the file size? I agree some kind of loading indicator would be ideal

@huumn
Copy link
Member Author

huumn commented Aug 29, 2023

It's the nature of gifs. It's like processing 100 images at once.

It seems like bumping the CPU/memory of the proxy helped some but it'd be nice to handle failure cases more gracefully

@ekzyis
Copy link
Member

ekzyis commented Sep 8, 2023

if they sit there we timeout and then it loads

This means they have enabled automatically to load external images, right?

We could maybe just load both requests in parallel or just drop the image proxy all together for users who would load external images anyway ("click to load external images" disabled in settings).

On another note, the current "click to load image" is also not good UX. It gives stackers no information why they have to click at all and if they know it's because of external images, we give them no information for an informed decision if they want to load that external image or not. We could at least show the external domain.


edit:

We could maybe just load both requests in parallel

that would make the imgproxy obsolete

@ekzyis
Copy link
Member

ekzyis commented Sep 10, 2023

GIFs are also cut off. Only first 10 frames are shown here: https://stacker.news/items/249778

@ekzyis
Copy link
Member

ekzyis commented Sep 11, 2023

I think we could improve performance by using lazy loading (so the image proxy does not get hit with 60+ unnecessary requests at the same time whenever someone loads Meme Monday) and using responsive images with srcset for proper optimization and scaling:

2023-09-11-223706_1920x1080_scrot

-- https://imagekit.io/website-analyzer?taskId=1694474566205&device=desktop


edit:

so the image proxy does not get hit with 60+ unnecessary requests at the same time whenever someone loads Meme Monday

this shouldn't be the case since the image requests should get cached by our CDN

@ekzyis ekzyis self-assigned this Sep 20, 2023
@huumn huumn closed this as completed Oct 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants