Identifying performance problems

I have a process that does this

  1. grabs a dataset from a rest endpoint and creates an in-memory Uipath database
  2. grabs a dataset from a SQL database and creates an in-memory Uipath database
  3. Loops through rows in one dataset - does a datatable lookup in the other data set - then loops through the fields to look for when the fields are different.
  4. If they are different i append a new json blob to a string(stringa=stringa+‘new json’)
  5. At the very end i save this json blob to a text file and push back to a rest endpoint

The datasets have maybe 15000 rows and 10 fields and the job takes many hours to run. How can I identify which activities are creating the slowness? the slowness is definitely in the loop and data comparison and not in the data collection or data pushing.

I would expect this in-memory comparison to happen much quicker. Appreciate any points in the right direction.

Fine

There are two simple ways to do this

  1. First is to run the entire process in normal Mode and see the execution logs where we can find the time taken between EAch activity

Or

  1. You can run in debug mode so that the activity which takes more time will stop and throw exception

Pls clarify with few more details if my understanding of this scenario is not exact

Cheers @FMCgclifford

Hi,

There is some overhead of processing activity In UiPath (Workflow Foundation). And if we use loop for large data, performance matter becomes apparent.
To solve this matter, we can reduce number of processing activity using LINQ or InvokeCode activity etc.

Hope this helps you.

Regards,

@Palaniyappan I took a look at the logs but i don’t see a log that shows each activity within the flow. Do I have to enable a special log to see this?

@Yoichi Can you please elaborate on LINQ/InvokeCode - how would these help?

Enable the log to info or trace level in robot assistant

You can find the execution logs in %localappdata%\UiPath\Logs sorted by date. In these files you will see that there are the parameters: totalExecutionTimeInSeconds and totalExecutionTime which show the process time from start to end.
At the begining of each log line there is also the start time of each step, so you will get an idea of how long it took for each step.

Cheers @FMCgclifford

Hi,

For example, If we use ForEachRow for 15K records and activity’s overhead is assumed 50msec, it takes 750sec for only overhead.
On the other hands, if we use ForEach inside Invoke code, activity’s overhead is only 50msec. It can improve performance especially in case of large records

img20211115-a1

Regards,