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

Switch PNG optimizer to not happen on png creation #341

Merged
merged 1 commit into from
Jun 8, 2024

Conversation

montehurd
Copy link
Collaborator

@montehurd montehurd commented Jun 8, 2024

Now this script kicks it off for all pngs:

optimize-pngs.sh

  • Fixes issue of screenshot optimizations sometimes overlapping with backstopJS image comparison
  • Makes png optimization container ephemeral
  • Runs optimizations in parallel, scaling with processor core count
  • Preserves checks for if images have already been optimized
  • No need to use the optimization script when developing locally. Will be triggered once a day on the server via cron for now

https://phabricator.wikimedia.org/T366981

Now this script kicks it off for all pngs:

optimize-pngs.sh

Fixes issue of screenshot optimizations sometimes
overlapping with backstopJS image comparison

Also makes png containers ephemeral

Runs optimizations in parallel, scaling with
processor core count

Preserves checks for if images have already been
optimized

No need to use the optimization script when
developing locally. Will be triggered once a
day on the server via cron for now
@montehurd montehurd merged commit d02fa98 into wikimedia:main Jun 8, 2024
1 check passed
@montehurd
Copy link
Collaborator Author

Just ran on the server and it took 982 seconds, or about 16.4 minutes to optimize all of our backstopJS images

The cron has been updated to run this once daily on a schedule that should keep it from happening when any backstopJS image comparisons are being done, and before we run our archive script

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

Successfully merging this pull request may close these issues.

1 participant