Hi,
I created a flow wich is triggert when as file is uploaded to Sharepoint.
Next a couple of conditions determine what to do with the file and the data in it.
First it checks the content-type, then the first line (column headers).
Both comparisons take 1 or more seconds, so far not a big deal, but then the flow starts ittarating all the lines in the file (about 5000 lines). On each row again a couple of comparisons take place like "is a column filled", "containes the colum a ; (multiple values)", etc. this to determine the values to use in a webservice. This webservice accepts a relative small amount of request per second / minute, so for now I limit the foreach to just 1 at a time.
All comparisons together take about 5 to 7 seconds for each line in the file. This way the flow runs a couple of hours, which is far to long especially knowing the most of this time is waiting for simple conditions like "[var] contains [char]"
setting the foreach to more then 1 could shorten the total time, but I can't get my head around a simple comparison has to take this long.
How can I speed up a comparison?
Changing the concurrency did the trick, but indeed variables got mixed up.
I'm going to exchange the variables with compose actions as you suggest.
Hi @MDeguelle ,
Provided its not a latency issue and you cannot cut down the number of lines from 5000, you could look at enabling concurrency.
Here are some articles that talks about it link and link.
One thing to be careful about is if you are setting variables in each loop. When you enable concurrency, they all run in parallel so it is possible for variables to get mixed up. The workaround is usually to replace variables with compose actions.
--------------------------------------------------------------------------
If I have answered your question, please mark my post as a solution
If you have found my response helpful, please give it a thumbs up
Connect on LinkedIn
WarrenBelz
146,651
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,999
Most Valuable Professional