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

Fullscreen GUI performance sucks #118

Open
crazyscot opened this issue Jun 17, 2024 · 0 comments
Open

Fullscreen GUI performance sucks #118

crazyscot opened this issue Jun 17, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@crazyscot
Copy link
Owner

crazyscot commented Jun 17, 2024

Even in a release build, we're not generally sweating all our CPU cores (at least on Linux).

Instrumentation reveals that Rust is passed tile jobs in parallel up to the number of cores when there are not many tiles, but as we get down to the tile size necessary for a full screen, only 1 job is dispatched without paralellisation. The engine is completing jobs as fast as (or fast than) JS can send them.

This is particularly noticeable when requesting a change of colourer.

Surprisingly, the pure-JS Mandelbrot set found at https://openseadragon.github.io/examples/advanced-data-model/ does not exhibit this performance suck, though it is only 1024^3 pixels in either dimension, and sets maxIterations to 100.

Suspicions:

  • There are algorithmic inefficiencies within OSD that bite as the number of tiles in the current (actively being drawn) layer grows
  • JS, being fundamentally single-threaded, simply can't get through the work quickly enough on a single core
  • The Tauri RPC mechanism is an additional bottleneck
  • OpenSeadragon and the DOM are dealing with excessive Canvas elements (one per tile?) which is causing screen repainting to take longer than we'd like

Things I've tried:

  • setting immediateRender which skips the larger tiles in favour of the detail. This doesn't help, and makes the problem appear more acute.
  • Changing TILE_SIZE. Unfortunately this seems to reduce UI responsiveness.

My tentative conclusion is that we are rapidly approaching an architectural dead-end and I'm going to have to rethink for v2.0.

@crazyscot crazyscot added the enhancement New feature or request label Jun 17, 2024
@crazyscot crazyscot added this to the v2.0 milestone Jun 17, 2024
@crazyscot crazyscot self-assigned this Jun 17, 2024
@crazyscot crazyscot changed the title Fullscreen performance sucks Fullscreen GUI performance sucks Jun 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant