Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.

First time visiting? Here are some places to start:
  1. Looking for a certain topic? Check out the categories filter or use Search (upper right).
  2. Need support? Ask a question to our Community Support category.
  3. Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
  4. Be respectful, on topic and if you see a problem, Flag it.

If you would like to contact our Community Manager personally, feel free to send a private message or an email.

STD vs Custom FeatureScript Speed?

S1monS1mon Member Posts: 883 PRO
In the process of investigating Bridging Curves, I noticed that copying a feature from the STD library and making minor modifications made it ~3x slower. I just did a test where I have my code (which has a few simple math changes), and the STD code where the only change is to add debug lines during edit, and then the standard Bridging Curve (in order below).



These are all set to G2G2 and are using essentially the same curves as inputs.



I have some hypotheses:

  1. "custom" FeatureScripts run in an interpreted-at-run-time environment, whereas the standard code is somehow compiled (to WASM?)
  2. There's something about including the other standard bits of the library which is slower for custom code vs the standard code
  3. The way the timing is measured is not consistent between standard and custom
Is there anything we can do differently to make custom FeatureScripts run with the same performance as the standard ones?

Tagged:

Comments

Sign In or Register to comment.