Too much time taken for a loop

Hi all,

I’m currently improving my workflow in Studio, and while I run the debug file, I find it may take 40 seconds for each of the activity within a loop, and for most of the time there were no activities running on the screen. I’m wondering if there are any action I can take to reduce the time taken within a loop. Thank you.

Hi @Paddi - May I know what are the actions that you are trying to perform within the loop, and why loop?

hi @ushu the action within the loop was to print each of the webpage, and I use the loop so that all the pages can be printed since it is a daily activity and the total pages won’t be the same everyday.

@Paddi

First of all …the original time it takes would be seen when you run from orchestrator or in run mode or from assitant…

In debug mode geneeally it takes a little extra time…you can reduce as well using linq or any other approach…

But first check the time taken while running from orchestrator …I believe it shpuld be faster

Cheers

@Paddi - Since you are dealing with the web page, are you using Element Exists or On Element Appear activity. These helps to take immediate actions, the moment web page loads completely

Classic design - Activities - Element Exists (uipath.com)

Classic Design - Activities - On Element Appear (uipath.com)

Modern Design - Activities - Check App State (uipath.com)

This is the main reason
When u run in debug mode speed of the bot execution is slower when compared to a run in normal mode

If you are trying to excite the bot click on drop down below to play button and choose either RUN File or Run project
This will run in normal mode and u won’t face this time issue

Or

There is another option where If you would like to test only certain activities u can right click on it and choose the following options based on ur need

  1. Test from here
  2. Test till here
  3. Test this activity

So that it time gets saved a lot

Cheers @Paddi

@Paddi

When you debug it will always slow, because you are troubleshooting
So if you try to run the workflow then you can identify the change in execution

Even you run also bot is taking similar time then you can check the activity properties whether there was some delays configured?

Thanks,
Srini

Hi @Palaniyappan,

I tried to use the run file instead of debug, but it still takes a long time. And there are not any delay between steps, do you have any other suggestions? Thank you.

Fine

May I know what activities re used in the place where workflow is getting slower
Any kind of a UI Based activities

@Paddi

Hi @Palaniyappan,

There are “Keyboard shortcuts”, several "click"s, “type into” and “assign” within the While loop.

Great
Run in debug mode and see at which activity it is stopping and taking more time

@Paddi