feat: improve 2D FT spectrum rendering speed#3927
Merged
hamed-musallam merged 7 commits intomainfrom Feb 26, 2026
Merged
Conversation
Deploying nmrium with
|
| Latest commit: |
52965de
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://be652177.nmrium.pages.dev |
| Branch Preview URL: | https://reduce-number-of-points-big.nmrium.pages.dev |
dfef6f3 to
ae74b3a
Compare
Member
|
I still feel too slow the contour generation. Looks the matrix used is still bigger than 1K x 1K It is a JCAMP file with a 2K × 1K size, and the difference in speed is noticeable. |
Member
Author
Hello Alejandro, the reduction works well, but the issue is with the speed, where the reduction function is called each time we zoom or change contour options. |
554eea0 to
663460a
Compare
As a first step toward cleaner separation, contour options are temporarily stored in `view.zoom.levels` instead of on the spectrum object. This is not the final structure, a dedicated `view.contours` object keyed by spectrum id will replace this in a follow-up.
lpatiny
approved these changes
Feb 25, 2026
Member
lpatiny
left a comment
There was a problem hiding this comment.
While it is slower after zooming it is much faster to change the contour levels.
We can merge this PR for me if the code is ok.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implement a new algorithm to reduce 2D FT points to 512 before plotting the contours