saucepleez / taskt

taskt (pronounced 'tasked' and formely sharpRPA) is free and open-source robotic process automation (rpa) built in C# powered by the .NET Framework
http://www.taskt.net/
1.1k stars 352 forks source link

Large file deserializing taking too much time. Any way to execute deserialized file directly? #231

Open salmaan3011 opened 4 years ago

salmaan3011 commented 4 years ago

I've been using Taskt for a few projects, and in one project, the code went to approx. 2000 lines. I always create a batch file which calls taskt executable with the xml filename as parameter, and it runs smoothly. But this big file takes around two minutes to deserialize every time I run the process.

Is there a way to execute the deserialized file directly without having to wait for taskt to deserialize the file every time the process runs? I've started working on much larger projects, which may go up to 4000 or 5000 lines, and it would be a problem if the deserializing process runs for 4-5 minutes each time.

Any help is greatly appreciated, and thanks for all the good work!

saucepleez commented 3 years ago

I assume you are still interested in this feature?

If so, is the issue with how long it takes taskt to deserialize the actual script file?

salmaan3011 commented 3 years ago

Yes, the issue is with the time it takes to deserialize the script file.

It would be really great if the deserialized file could be directly executed, so that it doesn't take a couple of minutes every time the script runs.

Thanks.

saucepleez commented 3 years ago

To ensure I understand the problem:

You are executing another sub-task multiple times using the Run Task command, and each time, the command expects to load that sub-task on-demand which in turn is taking a lot of time as each time its reloading it.

Is it acceptable for this sub-task to be loaded once, then remembered within the same engine session OR should this task always be remembered between automation sessions?

Also, how do you kick this process off? Is it from the builder or do you invoke the script directly?

salmaan3011 commented 3 years ago

No, I am executing the main xml file using command line like below:

C:\taskt\taskt.exe "PATH_TO_FILE\SCRIPT_FILE.xml"

Executing the xml file starts the deserializing process (even if I execute the file from the Taskt GUI window, using Save And Run button) and it takes around 60-80 seconds to deserialize before actual execution.

Following is the example of taskt log file:

2020-07-29 16:00:35.540 +05:30 [INF] Engine Class has been initialized 2020-07-29 16:00:35.732 +05:30 [INF] Client requesting to execute script using frmEngine 2020-07-29 16:00:35.755 +05:30 [INF] Bot Engine Started: 29-07-2020 16:00:35 2020-07-29 16:00:35.806 +05:30 [INF] Deserializing File 2020-07-29 16:00:35.810 +05:30 [INF] Script Path: PATH_TO_FILE\SCRIPT_FILE.xml 2020-07-29 16:01:45.084 +05:30 [INF] Creating Variable List 2020-07-29 16:01:45.155 +05:30 [INF] Creating App Instance Tracking List 2020-07-29 16:01:45.230 +05:30 [INF] Running Line 1: Set Engine Delay [Set Delay to 100ms between commands] 2020-07-29 16:01:45.687 +05:30 [INF] Running Line 2: Create Chrome Browser - [Instance Name: 'default', Instance Tracking: ]

I've highlighted the time in bold where the Deserializing File starts and when the actual script execution starts. The time between those 2 is approximately 70 seconds.

I need help in reducing this time, as it takes so much time for every execution.

Thanks.