Reducing Time

Hello,

I have a process that involves checking a reference number against a database to see if this customer is new or previous. However, this is taking a really long time, currently roughly over an hour to check and update or add three clients information’s into the excel document. There is currently roughly 390 clients in this excel document.

The process involves a for each row, checking against the reference number column and breaking if it finds a match. Is there a quicker way to do this check?

Thank you

HI @deguy42

You can try with Lookup datatable or filter datatable

Regards
Sudharsan

Hi @deguy42,

It depends if you are running the robot in debug mode or on execution via assistant or orchestrator. The later two will be as fast as any other method of iterating through the datatable. In debug mode you will observe that the For Each Row is slow.

Read more here:
There is no need to try to avoid For Each loops on large amounts of data - Help / Studio - UiPath Community Forum

Other method is to filter the datatable using the standard Filter Datatable Activity. This too will take time in debug mode, but will execute similar to For Each Row during execution.

Sadly, there is very little to optimize iterating through a datatable either with Linq or with standard datatable activities. The only one option I can think of is batch processing, but the time you save will not be a large chuck.

Hello @deguy42,

Maybe you could try with LINQ queries!!