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

BUG: Image Processing Performance Degradation in adjust_brightness_contrast (frontend\src-tauri\src\services\mod.rs) #351

Open
2 tasks done
priyankeshh opened this issue Feb 19, 2025 · 1 comment · May be fixed by #353

Comments

@priyankeshh
Copy link
Contributor

Is there an existing issue for this?

  • I have searched the existing issues

What happened?

The current implementation of adjust_brightness_contrast function shows several performance issues:

  1. Memory Leaks:
  • The image cache grows indefinitely without any size limits or cleanup mechanism
  • Each cached image consumes memory until application restart
  • No eviction policy for least used cached images
  1. CPU Bottlenecks:
  • The parallel processing implementation is incomplete
  • Lookup table (LUT) calculation is inefficient
  • Pixel manipulation code has redundant calculations
  1. Cache Issues:
  • Cache key generation is basic and could lead to collisions
  • No cache invalidation strategy
  • No cache size management
  1. Performance Impact:
  • High memory usage for large images
  • Slower processing times for batch operations
  • Potential application crashes with large image sets

Record

  • I agree to follow this project's Code of Conduct
@priyankeshh
Copy link
Contributor Author

I'd like to work on this issue.

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 a pull request may close this issue.

1 participant