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

Gui: Mark mouse move action handled to skip digging nodes #18860

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Flast
Copy link

@Flast Flast commented Jan 4, 2025

I'm not sure this is suitable modification but, SoNode::traversal is bottle neck of mouse hover operation in importing DXF, like following.

image

As you can see the worst bottle neck is digging down SoNode tree, but I think that digging down does nothing since the selection is already done by SoFCUnifiedSelection::handleEvent (similar to selection). If so, mark the action handled to skip digging down and performance bottle neck is moving to ray pick action like this.

image

I opened this PR as draft because I'm not familiar with FreeCAD and Coin3D. Please tell me if the modification will break any feature.

rel: #17185
sa: coin3d/coin#542 (ray pick action performance)

@github-actions github-actions bot added the Mod: Core Issue or PR touches core sections (App, Gui, Base) of FreeCAD label Jan 4, 2025
@maxwxyz maxwxyz requested a review from wwmayer January 4, 2025 10:47
@maxwxyz
Copy link
Collaborator

maxwxyz commented Jan 4, 2025

@Rexbas maybe you could take a look at this

@Rexbas
Copy link
Contributor

Rexbas commented Jan 4, 2025

I have had a quick look. I downloaded a random DXF file and with this PR the duration of SoFCUnifiedSelection::handleEvent has improved from about 1500 us down to about 500 us on my PC so that is great. It does not affect performance for the file in #17185. As far as I can tell this does not break (pre)selection.

As for the ray pick action, I have attempted to improve its performance in coin last week but had some technical difficulties, I will try again later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Mod: Core Issue or PR touches core sections (App, Gui, Base) of FreeCAD
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants