Hello,
I am new to using Power Automate and I am having a performance problem which may be due to the process architecture used. In general I have a task to upload the data from Excel File to SharePoint List (more less around 500 records). Each record has a code (100, 200, 220...) which specifies which group it belongs to. In the other excel I have these groups and there are about 25 of them, and I need for each item to be assigned an appropriate name from this other excel file based on the group code.
It currently looks as follows:
----------------------
1. Manually trigger a flow
2. Run script from SharePoint library (to convert data in the excel file to the table)
3. Compose
4. List rows present in a table from Excel 1
5. For each from point 4
5.1 Create item at SP List (for Code I use substring(item()?['Department'],0,3))
----------------------
6. Get items from SP List
7. List rows present in a table from Excel 2
8. Apply to each from point 6
8.1 Get item
8.2 For each from point 7
8.2.1 Condition (if Code from SP = Code from Excel 2)
8.2.2 TRUE = Update item.
----------------------
for a small dataset of about 50 records the process takes about 8 minutes, part 1 goes smoothly, most time is taken by part 2, but I am worried about how it will load 500 or 1000 data to check.
I wonder if I should merge step 5.1 Create item and at this stage add loops to check the code with the second file? (But I don't really know how to bite it).
I would appreciate any advice.

Thank you!