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: use new jpeg2000 codec to enhance memory performance #51

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Chinlinlee
Copy link
Member

Describe what this pull request is trying to achieve

Use new jpeg2000 codec from cornerstone to enhace mermory usage

  • Original codec will allocate about 400mb of memory
  • New version is about 70mb

Additional notes and description of your changes

  • The function decodeAsync becoming async function may cause issue with loading image before codec has finished loading

Environment this was tested in

OS: Windows 11 24H2
Browser: 132.0.6834.197

Test Details

Original

  • Open https://cylab-tw.github.io/bluelight/bluelight/html/start.html and load jpeg2000 image (size is 90kb)
  • Use chrome dev tool to analyze memory usage (427MB)
    image

Modified version of PR

  • Open https://cylab-tw.github.io/bluelight/bluelight/html/start.html and load jpeg2000 image (size is 90kb)
  • Use chrome dev tool to analyze memory usage (78 MB)
    image

- Original codec will allocate about 400mb of memory
- New version is about 70mb
@cylien cylien added the enhancement New feature or request label Mar 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants