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: Optimize frame buffer handling and WebP encoding #198

Closed
wants to merge 1 commit into from

Conversation

skidder
Copy link
Contributor

@skidder skidder commented Nov 6, 2024

This PR improves the WebP encoding/decoding pipeline with several optimizations and safety improvements:

  • Remove unused frameCount parameter from resize operations
  • Add safety check for animatedCompositeBuffer in dispose method
  • Improve error messages with more context in WebP encoder
  • Simplify control flow in calculateExpectedSize
  • Add proper frame offset handling in WebP encoding
  • Reorganize WebP decoder methods for better readability

The changes focus on reducing unnecessary allocations and improving error handling while maintaining compatibility with existing behavior.

@skidder
Copy link
Contributor Author

skidder commented Nov 25, 2024

Closing, would like to break this up into multiple PRs.

@skidder skidder closed this Nov 25, 2024
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