We have a model which has about 250 individual parameters. It is a fairly simple model which is mostly computing basic math and very little geometry. The model takes about 1 second to open initially in Grasshopper (very quick) and then using Pancake to analyze in which it is takes ~45ms to compute (with all parameters active and running). When not being used, the parameters have gates to avoid geometry or extra computation time being processed as output.
This model loads quickly as well when uploaded to Shapediver. When I open it in Shapediver, it opens fairly quickly and is responsive.
However when we use it on our platform via the API backend it takes excessively long to load. See image below, in total it took about ~65 seconds to load. The majority of that appears to be the initial call to the model via the API. After it loads, the model runs fine and is responsive.
Given that the model loads quickly in Grasshopper, on the Shapediver platform, and this same model when parred down loads quickly - is there a limit to the number of parameters we can have in a model?
Let me know if you are familiar with models which have a large amount of parameters. Is there a best practice or solution for models which require many parameters?
@alex15 given that your model works well on our platform, the problem you are experiencing is most likely related to your application. Please provide more details. In the screenshot I can’t see a request that took more than roughly 300ms, am I missing something?
@snabela Thanks for the response. Our developers were pointing to maybe something happening via the API as observation that when the model is parsed down to roughly 50 parameters it runs much quicker (as it normally does), but when it has 250 parameters it runs much slower on load. It certainly seems like something about the quantity of parameters is slowing it down in loading in return to our application.
I took another screenshot that might show it clearer. The page loads normally and then makes a call around 2.62s, then there is a gap of silence until about 1 minute (arrows in red in image).
Here is how it looks for the same model parsed down to roughly 50 parameters. The page loads similar to before and makes a call around 2.32s, then there is a gap of silence waiting for the return until about 4.2s (arrows in red in image).
This is an anomaly for us, since starting use of Shapediver back in 2017 we have never had such a long load time. Though this is by far the most parameters we have ever put in a model.
Would it be fair to say that something about either how the API call is being made or how the API call is being processed and returned is causing the problem? Have you seen similar interactions with models that have this caliber of parameter quantity? We are trying to trouble shoot this as the excessive load time creates a strain in use of the model by the client as a POS interaction.
Once the model page loads for the first time, use of the model is consistent and it updates each change in parameter in a normal amount of time (1.5 - 3 seconds). This issue only happens on initial load of the model.
If it is easier to show this, we can make an account to our platform (craftOS) and you can see the model load from the Developers Tools. Or let me know what else I can provide you to give better context and information. Thanks for the help!
Many thanks for providing more information. The network tab screenshot suggests that there is a waiting time between network requests, which most probably means the browser is busy doing something during that time. Please provide us with links to the model on the platform and to the web application, such that we can review this directly. In case you do not want to share these links here, please PM me.
@snabela Hello Alex, following up on this subject. I sent a couple messages as PM detailing the issue and our models, please let me know how else I can help you see the issue in lag between our call to the model and waiting in response.