-
Notifications
You must be signed in to change notification settings - Fork 24
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
Split shader into two compilation units & better clean up #2821
Conversation
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.
Very nice improvement! Noticeably faster for me as well.
As you mentioned, we should clean this up a little bit more in the future. The listeners are cleaned up when the arbitrary controller is stopped, but not when the plane controller is stopped (in contrast to the arbitrary controller, functionality is somewhat spread between the plane and scene controller for orthogonal mode, which is, I assume, why you left this out of this PR).
Testing went well, I opened different datasets in different modes and didn't notice any misbehavior.
listenToStoreProperty( | ||
storeState => getRequestLogZoomStep(storeState), | ||
zoomStep => { | ||
console.log("zoomStep"); |
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.
console.log can be removed
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.
Eyes like an eagle :)
Yes, exactly, the arbitrary plane is instantiated on every new switch to the arbitrary mode. In contrast, the planes for ortho are only initialized once, which means that the listeners won't pile up nor lead to memory leaks. They "just" listen in arbitrary mode, as well. Nevertheless, it should be cleaned up. I'll add it to #2615. |
This PR splits the shader into ortho and non-ortho units. For a multi layer dataset, the orthogonal mode loads way faster for me 🎉 (1 seconds vs. 5,6 seconds). The arbitrary mode will be a bit slow upon first loading (2.8 seconds vs. 0 seconds previously), but the total compilation time is faster, anyway.
I also took care of destroying some listeners when switching the view mode. We should clean this up a bit more in the future..
Mailable description of changes:
URL of deployed dev instance (used for testing):
Steps to test: