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

News Site uses the same image in different sizes to instead of different images #425

Open
bgrins opened this issue Aug 29, 2024 · 2 comments

Comments

@bgrins
Copy link
Contributor

bgrins commented Aug 29, 2024

This was raised in a Gecko bug https://bugzilla.mozilla.org/show_bug.cgi?id=1915251#c1:

So on each iteration the multiple decodes are because the image is used at different sizes, and the decodes are at different sizes. On a real news site each of those images would be a different image, so it wouldn't be multiple decodes. So that doesn't really seem like a problem. Perhaps the test should be altered to make it more realistic?

Then after an iteration the presshell is destroy which discards the decoded copy immediately, and the new iteration we decode again. We could be slightly less aggressive on this discard perhaps. I believe there was a reason why we were this discard was introduced with a large amount getting accumulated in the past. We could maybe just do the discard a little slower to avoid the re-decodes. The decodes are off main thread, so the speed up would be small likely, and the benefit to real sites limited to less usual conditions I think.

The idea is that it would be more realistic to add a unique placeholder images for each placement on the page rather than using a differently-sized resources/newssite/news-next/dist/placeholder_light.jpg for each:

Screenshot 2024-08-29 at 1 47 20 PM

@rniwa
Copy link
Member

rniwa commented Aug 29, 2024

Yeah, I noticed this as well. It would be more realistic to have a distinct image for each.

@flashdesignory
Copy link
Contributor

oh yeah, that was on my todo list at some point.
Happy to work on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants