-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
OHIF-2612: Fix ImageThumbnail unnecessary renderToCanvas calls #2613
base: v2-legacy
Are you sure you want to change the base?
Conversation
ngutman
commented
Nov 17, 2021
- Issue UI lags (jittery) when navigating studies with a large number of series #2612
- Don't call renderToCanvas if ImageThumbnail already loaded (to avoid unnecessary renders on every DOM change)
Codecov Report
@@ Coverage Diff @@
## master #2613 +/- ##
==========================================
- Coverage 13.20% 13.14% -0.06%
==========================================
Files 289 289
Lines 7816 7849 +33
Branches 1510 1512 +2
==========================================
Hits 1032 1032
- Misses 5474 5505 +31
- Partials 1310 1312 +2
Continue to review full report at Codecov.
|
@@ -86,7 +86,7 @@ function ImageThumbnail(props) { | |||
}, [purgeCancelablePromise]); | |||
|
|||
useEffect(() => { | |||
if (image.imageId) { | |||
if (image.imageId && isLoading) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't we add isLoading
in the dependency array of the useEffect
too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, please see my comment
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
base has changed, read more here #3477 |