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

perf: reduce cache size (1/4) #92

Merged
merged 5 commits into from
Nov 6, 2024
Merged

Conversation

privatenumber
Copy link
Member

@privatenumber privatenumber commented Nov 5, 2024

Description

  • Store images as the highest resolution we use, instead of the original quality. This probably has the biggest gains
  • Always use Buffers instead of ArrayBuffers. This allows us to remove any utils for converting ArrayBuffers to Base64.
  • Parallelize sharp processing avatar PNGs
  • Parallelize writing output formats

Results

  • Old cache size: 9.6 MB
  • New cache size: 2.6 MB

Linked Issues

Additional context

@privatenumber privatenumber marked this pull request as ready for review November 5, 2024 23:57
@privatenumber privatenumber changed the title perf: reduce cache size perf: reduce cache size (1/2) Nov 6, 2024
@privatenumber privatenumber changed the title perf: reduce cache size (1/2) perf: reduce cache size (1/3) Nov 6, 2024
@privatenumber privatenumber changed the title perf: reduce cache size (1/3) perf: reduce cache size (1/4) Nov 6, 2024
@antfu antfu merged commit 1e21afb into antfu-collective:main Nov 6, 2024
1 check passed
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