Skip to content

Conversation

Noisyfox
Copy link
Collaborator

@Noisyfox Noisyfox commented Nov 27, 2024

Preview will be rebuilt every time we made any changes to the project, such as moving an object, even when the Preivew page is not shown. Creating raycasters (called from GCodeViewer::load_shells) is slow when model has lots of triangles, and those raycasters won't be used at all since we can't interact with any model on the Preview page, so those raycasters are useless, and should not be created at all.
This should make the GUI more responsive when working with projects that has lots of complicated models.

Further more, should we skip the preview reload entirely if the preview page is not shown?

@Noisyfox Noisyfox marked this pull request as ready for review November 27, 2024 13:56
@Noisyfox Noisyfox added the QoL label Nov 27, 2024
Copy link
Owner

@SoftFever SoftFever left a comment

Choose a reason for hiding this comment

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

LGTM

@SoftFever
Copy link
Owner

Further more, should we skip the preview reload entirely if the preview page is not shown?

Technically, we will switch to the preview page automatically after slicing is done. If there are no changes, or if the re-slicing hasn't finished, it's basically a no-op in the load_shell function, if I recall correctly. So, it should be fine.

@SoftFever SoftFever merged commit 3b1c4f9 into SoftFever:main Nov 30, 2024
16 checks passed
@Noisyfox Noisyfox deleted the dev/preview-no-raycaster branch November 30, 2024 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants