Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.
First time visiting? Here are some places to start:- Looking for a certain topic? Check out the categories filter or use Search (upper right).
 - Need support? Ask a question to our Community Support category.
 - Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
 - 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?
S1mon                
                
                    Member Posts: 3,660 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:
                
                
These are all set to G2G2 and are using essentially the same curves as inputs.

I have some hypotheses:
- "custom" FeatureScripts run in an interpreted-at-run-time environment, whereas the standard code is somehow compiled (to WASM?)
 - There's something about including the other standard bits of the library which is slower for custom code vs the standard code
 - The way the timing is measured is not consistent between standard and custom
 
Simon Gatrall | Product Development Specialist | Open For Work
            Tagged:
            
        
0    
            
Comments
Of your hypotheses, definitely not #1 or #3. There is no WASM involved -- FeatureScript runs on the server (you may be interested in https://www.onshape.com/en/resource-center/videos/onshape-live-21-under-the-hood-how-onshapes-cloud-architecture-actually-works).