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

Festina lente #3166

Closed
wants to merge 6 commits into from
Closed

Festina lente #3166

wants to merge 6 commits into from

Conversation

paperboyo
Copy link
Contributor

@paperboyo paperboyo commented Feb 15, 2021

What does this change?

We are using a very nice fading of thumbnails and main preview images. Looks very premium. Sadly, it depends on them being loaded in full. We have imgOps configured to provide progressive JPEGs. Progressive JPEGs start showing up before they are fully loaded. This is a draft PR to test the hypothesis that the app will feel more responsive if images start to show up earlier.

This also changes the thumbnail generation, so that they are also progressive JPEGs.

Things to look out for:
- background-image chequerboard from underneath main preview image starts showing, like holes in socks [EDIT: fixed by this]

  • progressive rendering looks less cool even though it may feel speedier

How can success be measured?

App feels faster without feeling uglier.

Screenshots

Progressive on top, current at the bottom; Slow 3G throttling.

Main preview

both

Thumbnails (played at 25% speed for effect)

both_thumb5

Who should look at this?

Someone who knows how to hide the chequerboards and blue frames (?) until images fully load?

Tested?

  • locally by committer
  • locally by Guardian reviewer
  • on the Guardian's TEST environment

@AWare
Copy link
Contributor

AWare commented Feb 15, 2021

I think if we kept the image onLoad logic, and add a short circuit to it so if it takes longer than (say) 1 second, it shows what it has.

@paperboyo
Copy link
Contributor Author

so if it takes longer than (say) 1 second

I’m open to any adjustments! Would just be hard to come up with any specific timeout, since they can basically be instantaneous instead of prolonged. Especially for thumbnails.

Do you think it may sense to deploy to TEST and just play around. I don’t think the fact that in this period TEST will create progressively encoded thumbnails matter… Unless I have missed something, which is very possible…

@AWare
Copy link
Contributor

AWare commented Feb 15, 2021

I don't want to be mr "i hate angular" about this, but I think this is getting caught in the dispatch loop which is causing it to be slower than otherwise. I think that when you get a pagefull of images fade in at once, it's the promises or timeouts in the directive all getting batched into the same cycle

@paperboyo
Copy link
Contributor Author

Superseded by superior #3169.

@paperboyo paperboyo closed this Feb 18, 2021
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

Successfully merging this pull request may close these issues.

2 participants