web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id : n8rdwSUHaa91hW/HtX4dGn
Power Apps - Building Power Apps
Answered

Update SharePoint List Items is so horrible slow

Like (0) ShareShare
ReportReport
Posted on 13 Oct 2022 20:09:40 by 16

Hallo,

 

i had read a lot of posts but didnt find a good one, what helped me by my problem.
My Situation:
I have a powershell skript that takes all our onprem active directory users with some specific properties and fill them into a sharepoint list.
The creation from the powershell skript needs for our 3.500 Users (3.500 SP Elements) like 1H. (With: foreach -> item -> Add-PnPListItem)

We have also a powerapp what is connected to the SP list.
The app is a gallerylist with max. 100 elements per user of the app.
In this app, we want to update elements through a button with a patch method, but it needs 1-6 seconds to update each element.
When a user click the button on the first element and than fast on the second element, the app is becoming more slower and its loading.

My Question:
1. Is there a way to update one property of a sharepoint list item through a powerapp button in real time?
2. Is there a way to get 3.500 elements at once added to a sharepoint list in a couple of seconds, rather than a hour in my situation?

Thanks for your help!!

  • takolota1 Profile Picture
    4,898 Moderator on 19 Jul 2023 at 01:28:52
    Re: Update SharePoint List Items is so horrible slow

    @RandyHayes & @Bamboulete 

     

    If you’re still working with larger SP lists & need to create and/or update a lot of items at once, this faster update & create flow template may interest you:

    https://powerusers.microsoft.com/t5/Power-Automate-Cookbook/Batch-Update-Create-and-Upsert-SharePoint-Lists/td-p/1365410

  • Verified answer
    RandyHayes Profile Picture
    76,287 Super User 2024 Season 1 on 13 Oct 2022 at 21:09:18
    Re: Update SharePoint List Items is so horrible slow

    @Bamboulete 

    Yes, this is a good source of slowness.

     

    So, I work with very large SharePoint lists quite often (in fact working on one with over 900k records right now).  There are a lot of factors that go into getting the performance "acceptable" - and bear in mind, there will always be slowness possible (even with small lists), it is the nature of the technology.

     

    For most of the time for a gallery, I will pre-filter large lists into app memory in a variable.  This is static though and will not change when records are changed via patch.  

    If you want to simulate the two, then you need to instead enlist a collection (as it is a table variable that you can add/remove/edit records in).  Then your Patch would not only patch the data source, but a second patch to the collection is needed to reflect the changes in the app.  It's more work, but it is work to solve an particular problem, so it is acceptable.

     

    Also, look to the SharePoint side...since you are using the 'UPN-Manager' and 'UPN-Datenpfleger' columns in your filter...make sure you have Indexes set for both of those columns.  This will help tremendously.

  • Bamboulete Profile Picture
    16 on 13 Oct 2022 at 21:08:54
    Re: Update SharePoint List Items is so horrible slow

    Another maybe important thing is, that i use the the email field to display an image of office365 in each item if available:

    Bamboulete_1-1665695320797.png

     

  • Bamboulete Profile Picture
    16 on 13 Oct 2022 at 21:00:28
    Re: Update SharePoint List Items is so horrible slow

    @RandyHayes 
    Many thanks for the answer!
    I have thought much wrong until your answer.
    I think i got it!
    Of course, i think its because of the large amount fo users and the computing load what happens all the time, when the filter for the user needs to "recalibrate" through the sync.
    My Item Filter on the Gallery:

     

    Filter(
     Userlist;
     ('UPN-Manager'=User().Email)||('UPN-Datenpfleger'=User().Email)
    )

     

    Bamboulete_0-1665694915431.png

     


    Maybe 3.500 Sharepoint elements is to much to filter after each update...How can i handle this!?

    So much thanks for your answer! 

  • RandyHayes Profile Picture
    76,287 Super User 2024 Season 1 on 13 Oct 2022 at 20:48:16
    Re: Update SharePoint List Items is so horrible slow

    @Bamboulete 

    One aspect of PowerApps that is often overlooked is the dependency on the datasource in other places.

    The way PowerApps works is that it is always real-time updated.  Meaning that, just like Excel (which PowerApps is modeled after), when you update a value in a cell that another cell has a referring formula to (and perhaps that too then has additional formulas from other cells, and so on), ALL the formulas update their information.

    Same in PowerApps!  

    If you update the datasource, and you have other formulas that use the datasource (commonly like your Gallery Items), then that formula must re-evaluate and update.  

    These type of things cause "unseen" slowness.  It appears that the patch function is to blame, but it is really other formulas that rely on the datasource.

     

    The BEST way to pinpoint performance issues is to utilize the monitor tool.  There you can see how much time any individual function takes (like your Patch specifically), and then you can see how long any other relying formula takes to update.

     

    As for the update of all items, yes, you can do this, but there are some limitations and depending on the number of records...it still can take a good chunk of time.

     

    If in-app real-time data related to the changes is not needed, then PowerAutomate can be utilized to do the work.  It will still take some time, but it will be out of band and not seen from the app perspective. 

  • Bamboulete Profile Picture
    16 on 13 Oct 2022 at 20:46:43
    Re: Update SharePoint List Items is so horrible slow

     

     

     

  • Bamboulete Profile Picture
    16 on 13 Oct 2022 at 20:39:07
    Re: Update SharePoint List Items is so horrible slow

    Is there also a way to update all SP online items at once (Or all selected for example)?

  • Bamboulete Profile Picture
    16 on 13 Oct 2022 at 20:37:51
    Re: Update SharePoint List Items is so horrible slow

    @RandyHayes 
    Nope, this is the function on the button what is on each element(Each element here is one element in a sharepoint online list):

    Bamboulete_0-1665693754330.png

     

    But when a user clicks for example on the first green button and than on the next, its loading and the app becomes very slow.... i have no idea why this happens...

  • RandyHayes Profile Picture
    76,287 Super User 2024 Season 1 on 13 Oct 2022 at 20:32:12
    Re: Update SharePoint List Items is so horrible slow

    @Bamboulete 

    So this is an individual one-record patch!

     

    How is that causing performance issues?  Or is it?  I was under the impression that you were trying to bulk change a lot of records.

  • Bamboulete Profile Picture
    16 on 13 Oct 2022 at 20:25:26
    Re: Update SharePoint List Items is so horrible slow

    @RandyHayes 
    thanks for awnsering so fast! 
    In Powerapps:

     

    Patch(Userlist;ThisItem; 
    {
    Valid:true;
    'Email-Validator': varTest;
    'letzte Validierung am': Now();
    ValidDate: (DateAdd(
     DateAdd(
     Date(Year(Now());
     (RoundUp(Month(Now())/3;0) * 3) - 2;
     1
     );
     6;
     Months
     );
     -1;
     Days
    )) 
    }
    )


    In Powershell:

    $element = add-pnplistitem -force -values {
     Name = $name;
     Username = $username;
     Email = $mail;
     .....
     .....
     --> Its like 15 properties or so. I have the skript not here yet...
    
    }

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 791 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 410 Super User 2025 Season 2

#3
mmbr1606 Profile Picture

mmbr1606 275 Super User 2025 Season 2

Loading complete