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

Split shader into two compilation units & better clean up #2821

Merged
merged 3 commits into from
Jun 29, 2018

Conversation

philippotto
Copy link
Member

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:

  • Performance improvements for orthogonal mode.

URL of deployed dev instance (used for testing):

Steps to test:

  • load different datasets in different modes

  • Ready for review

Copy link
Member

@daniel-wer daniel-wer left a 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");
Copy link
Member

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

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Eyes like an eagle :)

@philippotto
Copy link
Member Author

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).

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.

@philippotto philippotto merged commit 50ad600 into master Jun 29, 2018
@normanrz normanrz deleted the shader-split branch July 2, 2018 17:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants