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

Suggestion: Avoid Allocating a New Double Array in PerceptualHash.Hash #125

Open
developerjoy opened this issue Jan 10, 2025 · 0 comments
Open

Comments

@developerjoy
Copy link

Hello,

Thank you for the excellent work on CoenM.ImageSharp.ImageHash! It has been very helpful for my project.

I noticed that the PerceptualHash.Hash implementation allocates a new double array every time it is called. While this works well functionally, it can lead to frequent memory allocations, especially when processing a large number of images. This could negatively impact performance due to increased garbage collection.

Would it be possible to optimize the method to reuse the double array or use a more memory-efficient approach?

Thank you for considering this suggestion!

Best regards,
Costa

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

No branches or pull requests

1 participant