How can I test the impact of using custom C# vs a Forge component?
The action is an exponential backoff retry loop. I want to compare the Sleep Forge component to a simple C# script of:
using System.Threading;public void PauseForSeconds(int seconds){ Thread.Sleep(seconds * 1000);}
In practice, the retry loop should only get invoked when the external API is having issues, which from experience is rare. The retry loop might run once every 4-6 weeks. The loop contains a counter and calculates the 'seconds' variable that will get fed into the C# script.
However, I'd like to setup a test scenario to see which method is more performative. I assume I'll have to use LifeTime in some way. What should I be watching for? Has anyone done something like this before?
Hi Daniel,
Just use the Sleep Forge component (C# extension), it is a trusted component and optimized to perform good. No reason to "invent the wheel again".
The Sleep Forge component is used in many OutSystems factories without any issues (see download rate and review score!)
Regards,
Daniel
Thanks for the response @Daniel Kuhlmann.
Would it cost me an application object to use the Sleep Forge component?
Daniel,The Sleep component is also an extension written in C# and thus is not charged as an Application Object when used per the latest documentation.https://success.outsystems.com/support/licensing/application_objects/ (Additionally we've done some testing recently to verify that this is true.)
Best,RAD Manage
No, only screens, entities, and API methods count towards an AO. C# Extensions don't count for AO's.
I'm wondering Thread.Sleep is common need in programming, why OutSystems don't provide a standard function for this :)
They do in ODC now. But the sleep component is so good everybody uses it