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

Use less ram when initializing data textures #6711

Merged
merged 18 commits into from
Jan 4, 2023
Merged

Use less ram when initializing data textures #6711

merged 18 commits into from
Jan 4, 2023

Conversation

philippotto
Copy link
Member

@philippotto philippotto commented Dec 20, 2022

See code comments.

URL of deployed dev instance (used for testing):

Steps to test:

  • open a dataset with a seg layer
  • check that console does not show webgl errors
  • change the color of a segment
  • run window.testContextLoss() in the console and check that wk is usable again after a few seconds of flickering

Issues:

  • perf perf perf

(Please delete unneeded items, merge only when none are left open)

@philippotto philippotto self-assigned this Dec 20, 2022
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.

As far as I can see, everything still works.

When I switch to flight mode for the first time, I get a WebGL warning [.WebGL-0xcdc0032ea00] GL_INVALID_VALUE: Texture dimensions must all be greater than zero. which is one less than on master (where there is also [.WebGL-0xcdc050ba900] GL_INVALID_OPERATION: Level of detail outside of range.), so that's good I suppose 😁

Your call whether it makes sense to execute the screenshot tests for this branch to make sure everything still renders as usual (since you can better assess what changed in this PR).

Edit: Also a final test on an iphone whether this still fixes the RAM initialization issue would be good :)

.circleci/not-on-master.sh Outdated Show resolved Hide resolved
frontend/javascripts/libs/UpdatableTexture.ts Outdated Show resolved Hide resolved
@philippotto
Copy link
Member Author

Your call whether it makes sense to execute the screenshot tests for this branch to make sure everything still renders as usual (since you can better assess what changed in this PR).

This was a good call 👍 The nightly showed that the skeletons were broken, because a normal THREE.DataTexture was used for that 🙈 I adapted the workaround so, that only gl calls are noop'ed if an empty TypedArray is passed. I think, this should be way more robust.

The last nightly still failed, but this is because the connectome tab is not enabled for the particular dev instance. I tested that case manually and it worked. Please have a final look at my last changes and then I'd merge this PR 🤞

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.

Nice work! Glad you made the call to execute the screenshot tests and caught that bug 🥇

@philippotto philippotto enabled auto-merge (squash) January 4, 2023 15:49
@philippotto philippotto merged commit 6ab1bcd into master Jan 4, 2023
@philippotto philippotto deleted the less-ram branch January 4, 2023 16:07
hotzenklotz added a commit that referenced this pull request Jan 5, 2023
…cing

* 'master' of github.com:scalableminds/webknossos:
  Replace babel with esbuild for tests and for webpack (#6527)
  Use less ram when initializing data textures (#6711)
  Composable sql interpolation (#6718)
  Release 23.01.0 (#6717)
  add license checker (#6715)
  Fix brush performance for coarse mags & avoid some unnecessary re-renders (#6708)
  Change backend format command (#6697)
  Improve layout of terms of services check (#6712)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants