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

Prevent regenerating asset meta file for non-images #3609

Merged
merged 1 commit into from
Apr 28, 2021

Conversation

jasonvarga
Copy link
Member

In this comment on the static site generator @tao was finding pages with mp3 assets taking a bonkers amount of time.

Turns out it was because when width was being requested somewhere in augmentation. Width comes from dimensions, dimensions looks in the meta data. If there's a null value in the meta data, it assumes its just missing or invalid and regenerates it.

His asset container had a ton of mp3 files, on s3, and would regenerate the meta file for each of them on every page load.

It's an mp3 so the dimensions should be null. This PR adds that short circuit.

The page flies now.

@jasonvarga jasonvarga merged commit 14cc1fa into 3.1 Apr 28, 2021
@jasonvarga jasonvarga deleted the fix/non-image-dimensions branch April 28, 2021 19:48
@jasonvarga jasonvarga mentioned this pull request May 12, 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.

1 participant