Merged
Conversation
Most of the time spent drawing the view in TechDraw is spent looking up parameters. Now, load EdgeFuzz/MarkFuzz parameters only during initialization to avoid looking for them in the XML structure everytime the scene in painted. This improves TechDraw interactivity by a lot when dealing with large models.
2 tasks
WandererFan
approved these changes
Mar 27, 2026
Contributor
WandererFan
left a comment
There was a problem hiding this comment.
desk check of code looks fine. Not tested.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
After #25898 , interacting with the TechDraw canvas view is still slow with large models. After analysis, most of the time taken to draw the view is now spent looking up parameters
EdgeFuzzandMarkFuzz. Looking up parameters is expensive due to the design ofBase/Parameter.cpp: every time a parameter group or value is looked up, the XML Xerces object is iterated recursively until the item is found. When doing that for every edge in the view, it is very time-consuming.There is probably work to be done to make
Parameter.cppmore efficient by changing the internal structures, but this is work for another day. This fix goes the simpler route of storing parameter value when the item is created, and using the memorized value afterwards.This breaks the feature of hot-reloading the parameter value when the settings are changed, but I don't think this is a big deal, it is an advanced parameter that barely anyone would change anyways.
Issues
#24191
Before and After Images
On a moderately large scene (~1000 vertices+edges), paint time jumps from 200ms to 50ms.
No LLM was used in the writing of this PR.
@WandererFan