Dataverse Migration, Power Apps vs Logic Apps Speed Test
Recently I’ve been looking into fine tuning Power Automate for performance, a customer needs a large regular data load into the Dataverse, the number of records keeps growing and my fine tuning keeps improving performance. A thank you to John Liu and some information from the 2019 power platform conference (check this youtube video out to get some great performance pointers).
My next evolution was to see what would happen if I used
Logic Apps, that’ll surely make things quicker right?
My scenario is grabbing circa half a million records using
GraphQL http requests and adding/updating them to Dataverse, doing some logic
and lookups along the way.
I decided to make a crude example just to see what the
performance was like, I created a source repository to mimic a large data set,
added 10,000 items, with 20 fields, 19 of which were guids and 1 date field
just to represent a reasonable chunk of data.
Both of the examples below I run the apply to each with concurrency set to max! (50)
Power Automate Results
The Power Automate to move this from one table to another
you can see below:
Total run time: 9m 39s
Logic Apps Results
Next onto a representative Logic App, note I couldn’t get
the Preview list rows to work, so I went legacy here, but the Add rows is the
new preview version:
Total run time 11m 53s
I must confess, I ran this once, they are on different
tenants (both test tenants so the 10k run was fresh on each). My main goal was
to see if there was a scale difference in performance like wow it’s 10x faster
on a logic app. For me I’m going to stick with Power Automate for now.
Hope this might be useful.
Side note – an interesting observation, when I do the data
import from my GraphQL requests, I originally retrieved all the existing ID’s
of the records in my target table using list rows, to then use the inbuilt
“Filter” step to check if I’m creating a new item or updating an existing.
Don’t do this – the array manipulation is slower than
just querying the dataverse for field=id and checking if there was an item
returned! For over 500 test records it halved the processing time – it’ll
probably be more on a larger dataset.
Comments
Post a Comment