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 :
Power Apps - Power Apps Pro Dev & ISV
Unanswered

SharePoint Online list items loading is slow in PowerApps

(0) ShareShare
ReportReport
Posted on by 114
Hello Team,
 
I have code to load 1 lakh items from a SharePoint online list, but it takes about 15 seconds to load.
I tried commented section code as well, but that also takes the same time.

Can we faster way to load the items?

Below is my code on App > OnStart
 
//My Visitors from AllVisitors list
Clear(collMyVisitors);
With(
 
   {
      _Sets:
      With(
         {
            _Limits:
            With(
               {
                  _Limit:
                  Sort(
                     AllVisitors,
                     Indexed_ID,
                     SortOrder.Descending
                  )
               },
               RoundDown(
                  First(_Limit).Indexed_ID / 2000,
                  0
               ) + 1
            )
         },
         AddColumns(
            RenameColumns(
               Sequence(
                  _Limits,
                  0,
                  2000
               ),
               Value,
               LowID
            ),
            HighID,
            LowID + 2000
         )
      )
   },
   ForAll(
      _Sets As _MaxMin,
      Collect(
         collMyVisitors,
         Sort(
         Filter(
            AllVisitors,
            Indexed_ID > _MaxMin.LowID && Indexed_ID <= _MaxMin.HighID
            && Requestor.Email = User().Email), Indexed_ID, SortOrder.Ascending)
         )
      )
);
 
/*
Concurrent(
    ClearCollect(tempMyVisitors1,  Filter('AllVisitors', Indexed_ID <= startIndex_ID + 2000)),
    ClearCollect(tempMyVisitors2,  Filter('AllVisitors', Indexed_ID > startIndex_ID + 2000  && Indexed_ID <= startIndex_ID + 4000)),
    ClearCollect(tempMyVisitors3,  Filter('AllVisitors', Indexed_ID > startIndex_ID + 4000  && Indexed_ID <= startIndex_ID + 6000)),
    ClearCollect(tempMyVisitors4,  Filter('AllVisitors', Indexed_ID > startIndex_ID + 6000  && Indexed_ID <= startIndex_ID + 8000)),
    ClearCollect(tempMyVisitors5,  Filter('AllVisitors', Indexed_ID > startIndex_ID + 8000  && Indexed_ID <= startIndex_ID + 10000)),
    ClearCollect(tempMyVisitors6,  Filter('AllVisitors', Indexed_ID > startIndex_ID + 10000 && Indexed_ID <= startIndex_ID + 12000)),
    ClearCollect(tempMyVisitors7,  Filter('AllVisitors', Indexed_ID > startIndex_ID + 12000 && Indexed_ID <= startIndex_ID + 14000)),
    ClearCollect(tempMyVisitors8,  Filter('AllVisitors', Indexed_ID > startIndex_ID + 14000 && Indexed_ID <= startIndex_ID + 16000)),
    ClearCollect(tempMyVisitors9,  Filter('AllVisitors', Indexed_ID > startIndex_ID + 16000 && Indexed_ID <= startIndex_ID + 18000)),
    ClearCollect(tempMyVisitors10, Filter('AllVisitors', Indexed_ID > startIndex_ID + 18000 && Indexed_ID <= startIndex_ID + 20000)),
    ClearCollect(tempMyVisitors11, Filter('AllVisitors', Indexed_ID > startIndex_ID + 20000 && Indexed_ID <= startIndex_ID + 22000)),
    ClearCollect(tempMyVisitors12, Filter('AllVisitors', Indexed_ID > startIndex_ID + 22000 && Indexed_ID <= startIndex_ID + 24000)),
    ClearCollect(tempMyVisitors13, Filter('AllVisitors', Indexed_ID > startIndex_ID + 24000 && Indexed_ID <= startIndex_ID + 26000)),
    ClearCollect(tempMyVisitors14, Filter('AllVisitors', Indexed_ID > startIndex_ID + 26000 && Indexed_ID <= startIndex_ID + 28000)),
    ClearCollect(tempMyVisitors15, Filter('AllVisitors', Indexed_ID > startIndex_ID + 28000 && Indexed_ID <= startIndex_ID + 30000)),
    ClearCollect(tempMyVisitors16, Filter('AllVisitors', Indexed_ID > startIndex_ID + 30000 && Indexed_ID <= startIndex_ID + 32000)),
    ClearCollect(tempMyVisitors17, Filter('AllVisitors', Indexed_ID > startIndex_ID + 32000 && Indexed_ID <= startIndex_ID + 34000)),
    ClearCollect(tempMyVisitors18, Filter('AllVisitors', Indexed_ID > startIndex_ID + 34000 && Indexed_ID <= startIndex_ID + 36000)),
    ClearCollect(tempMyVisitors19, Filter('AllVisitors', Indexed_ID > startIndex_ID + 36000 && Indexed_ID <= startIndex_ID + 38000)),
    ClearCollect(tempMyVisitors20, Filter('AllVisitors', Indexed_ID > startIndex_ID + 38000 && Indexed_ID <= startIndex_ID + 40000)),
    ClearCollect(tempMyVisitors21, Filter('AllVisitors', Indexed_ID > startIndex_ID + 40000 && Indexed_ID <= startIndex_ID + 42000)),
    ClearCollect(tempMyVisitors22, Filter('AllVisitors', Indexed_ID > startIndex_ID + 42000 && Indexed_ID <= startIndex_ID + 44000)),
    ClearCollect(tempMyVisitors23, Filter('AllVisitors', Indexed_ID > startIndex_ID + 44000 && Indexed_ID <= startIndex_ID + 46000)),
    ClearCollect(tempMyVisitors24, Filter('AllVisitors', Indexed_ID > startIndex_ID + 46000 && Indexed_ID <= startIndex_ID + 48000)),
    ClearCollect(tempMyVisitors25, Filter('AllVisitors', Indexed_ID > startIndex_ID + 48000 && Indexed_ID <= startIndex_ID + 50000)),
    ClearCollect(tempMyVisitors26, Filter('AllVisitors', Indexed_ID > startIndex_ID + 50000 && Indexed_ID <= startIndex_ID + 52000)),
    ClearCollect(tempMyVisitors27, Filter('AllVisitors', Indexed_ID > startIndex_ID + 52000 && Indexed_ID <= startIndex_ID + 54000)),
    ClearCollect(tempMyVisitors28, Filter('AllVisitors', Indexed_ID > startIndex_ID + 54000 && Indexed_ID <= startIndex_ID + 56000)),
    ClearCollect(tempMyVisitors29, Filter('AllVisitors', Indexed_ID > startIndex_ID + 56000 && Indexed_ID <= startIndex_ID + 58000)),
    ClearCollect(tempMyVisitors30, Filter('AllVisitors', Indexed_ID > startIndex_ID + 58000 && Indexed_ID <= startIndex_ID + 60000)),
    ClearCollect(tempMyVisitors31, Filter('AllVisitors', Indexed_ID > startIndex_ID + 60000 && Indexed_ID <= startIndex_ID + 62000)),
    ClearCollect(tempMyVisitors32, Filter('AllVisitors', Indexed_ID > startIndex_ID + 62000 && Indexed_ID <= startIndex_ID + 64000)),
    ClearCollect(tempMyVisitors33, Filter('AllVisitors', Indexed_ID > startIndex_ID + 64000 && Indexed_ID <= startIndex_ID + 66000)),
    ClearCollect(tempMyVisitors34, Filter('AllVisitors', Indexed_ID > startIndex_ID + 66000 && Indexed_ID <= startIndex_ID + 68000)),
    ClearCollect(tempMyVisitors35, Filter('AllVisitors', Indexed_ID > startIndex_ID + 68000 && Indexed_ID <= startIndex_ID + 70000)),
    ClearCollect(tempMyVisitors36, Filter('AllVisitors', Indexed_ID > startIndex_ID + 70000 && Indexed_ID <= startIndex_ID + 72000)),
    ClearCollect(tempMyVisitors37, Filter('AllVisitors', Indexed_ID > startIndex_ID + 72000 && Indexed_ID <= startIndex_ID + 74000)),
    ClearCollect(tempMyVisitors38, Filter('AllVisitors', Indexed_ID > startIndex_ID + 74000 && Indexed_ID <= startIndex_ID + 76000)),
    ClearCollect(tempMyVisitors39, Filter('AllVisitors', Indexed_ID > startIndex_ID + 76000 && Indexed_ID <= startIndex_ID + 78000)),
    ClearCollect(tempMyVisitors40, Filter('AllVisitors', Indexed_ID > startIndex_ID + 78000 && Indexed_ID <= startIndex_ID + 80000)),
    ClearCollect(tempMyVisitors41, Filter('AllVisitors', Indexed_ID > startIndex_ID + 80000 && Indexed_ID <= startIndex_ID + 82000)),
    ClearCollect(tempMyVisitors42, Filter('AllVisitors', Indexed_ID > startIndex_ID + 82000 && Indexed_ID <= startIndex_ID + 84000)),
    ClearCollect(tempMyVisitors43, Filter('AllVisitors', Indexed_ID > startIndex_ID + 84000 && Indexed_ID <= startIndex_ID + 86000)),
    ClearCollect(tempMyVisitors44, Filter('AllVisitors', Indexed_ID > startIndex_ID + 86000 && Indexed_ID <= startIndex_ID + 88000)),
    ClearCollect(tempMyVisitors45, Filter('AllVisitors', Indexed_ID > startIndex_ID + 88000 && Indexed_ID <= startIndex_ID + 90000)),
    ClearCollect(tempMyVisitors46, Filter('AllVisitors', Indexed_ID > startIndex_ID + 90000 && Indexed_ID <= startIndex_ID + 92000)),
    ClearCollect(tempMyVisitors47, Filter('AllVisitors', Indexed_ID > startIndex_ID + 92000 && Indexed_ID <= startIndex_ID + 94000)),
    ClearCollect(tempMyVisitors48, Filter('AllVisitors', Indexed_ID > startIndex_ID + 94000 && Indexed_ID <= startIndex_ID + 96000)),
    ClearCollect(tempMyVisitors49, Filter('AllVisitors', Indexed_ID > startIndex_ID + 96000 && Indexed_ID <= startIndex_ID + 98000)),
    ClearCollect(tempMyVisitors50, Filter('AllVisitors', Indexed_ID > startIndex_ID + 98000 && Indexed_ID <= startIndex_ID + 100000))
);
 
// 🔹 Merge all into one collection
ClearCollect(
    collMyVisitors,
    tempMyVisitors1,tempMyVisitors2,tempMyVisitors3,tempMyVisitors4,tempMyVisitors5,tempMyVisitors6,
    tempMyVisitors7,tempMyVisitors8,tempMyVisitors9,tempMyVisitors10,tempMyVisitors11,tempMyVisitors12,
    tempMyVisitors13,tempMyVisitors14,tempMyVisitors15,tempMyVisitors16,tempMyVisitors17,tempMyVisitors18,
    tempMyVisitors19,tempMyVisitors20,tempMyVisitors21,tempMyVisitors22,tempMyVisitors23,tempMyVisitors24,
    tempMyVisitors25,tempMyVisitors26,tempMyVisitors27,tempMyVisitors28,tempMyVisitors29,tempMyVisitors30,
    tempMyVisitors31,tempMyVisitors32,tempMyVisitors33,tempMyVisitors34,tempMyVisitors35,tempMyVisitors36,
    tempMyVisitors37,tempMyVisitors38,tempMyVisitors39,tempMyVisitors40,tempMyVisitors41,tempMyVisitors42,
    tempMyVisitors43,tempMyVisitors44,tempMyVisitors45,tempMyVisitors46,tempMyVisitors47,tempMyVisitors48,
    tempMyVisitors49,tempMyVisitors50
);
 
// 🔹 Clean up temporary collections
Concurrent(
    Clear(tempMyVisitors1), Clear(tempMyVisitors2), Clear(tempMyVisitors3), Clear(tempMyVisitors4), Clear(tempMyVisitors5),
    Clear(tempMyVisitors6), Clear(tempMyVisitors7), Clear(tempMyVisitors8), Clear(tempMyVisitors9), Clear(tempMyVisitors10),
    Clear(tempMyVisitors11), Clear(tempMyVisitors12), Clear(tempMyVisitors13), Clear(tempMyVisitors14), Clear(tempMyVisitors15),
    Clear(tempMyVisitors16), Clear(tempMyVisitors17), Clear(tempMyVisitors18), Clear(tempMyVisitors19), Clear(tempMyVisitors20),
    Clear(tempMyVisitors21), Clear(tempMyVisitors22), Clear(tempMyVisitors23), Clear(tempMyVisitors24), Clear(tempMyVisitors25),
    Clear(tempMyVisitors26), Clear(tempMyVisitors27), Clear(tempMyVisitors28), Clear(tempMyVisitors29), Clear(tempMyVisitors30),
    Clear(tempMyVisitors31), Clear(tempMyVisitors32), Clear(tempMyVisitors33), Clear(tempMyVisitors34), Clear(tempMyVisitors35),
    Clear(tempMyVisitors36), Clear(tempMyVisitors37), Clear(tempMyVisitors38), Clear(tempMyVisitors39), Clear(tempMyVisitors40),
    Clear(tempMyVisitors41), Clear(tempMyVisitors42), Clear(tempMyVisitors43), Clear(tempMyVisitors44), Clear(tempMyVisitors45),
    Clear(tempMyVisitors46), Clear(tempMyVisitors47), Clear(tempMyVisitors48), Clear(tempMyVisitors49), Clear(tempMyVisitors50)
);
*/
I have the same question (0)
  • MS.Ragavendar Profile Picture
    4,856 Super User 2025 Season 2 on at
    SharePoint Online list items loading is slow in PowerApps
     
    Loading the data in the App > OnStart  is not recommended best practice because as your data volume increase this might lead to crash you app. Because huge data is loading in the memory of the app.
     
    I saw the code you have implemented the logics based on @Warren implementation (https://www.practicalpowerapps.com/delegation/with-statement-managing-delegation/)
    • Add the Pagination logic to the data
    • Implement in the screen on visible and add the loader to the screen.
  • WarrenBelz Profile Picture
    152,667 Most Valuable Professional on at
    SharePoint Online list items loading is slow in PowerApps
    Responding here as that code is off my blogI will add a few comments here
    • 1 lakh (I needed to Google it) is 100,000 records - I am amazed it only takes 15 seconds to load.
    • Trying to do anything with it in the memory of the device (filter etc - even display) will probably expect your users to like coffee - they will have time to make a cup including boiling the water waiting for it to resolve.
     
    Sorry for the flippant reply, but the Delegation maximum of 2,000 records is there for for good reason - Power Apps was never designed to process large volumes of data locally - that is what data source servers are for. SharePoint or Dataverse will gladly handle 100k plus records and return you data quickly and accurately as long as the query is Delegable. I have found that even "double" sized collections - 4,000 records suffer noticable performance penalties.
     
    Even if you return the data with Power Automate (which may be quicker with some pagination), you will still suffer the consequences of trying to do something with the returned data (as mentioned above), not to mention the overhead penalty in the app itself with that amount of data stored locally.
     
    Please âœ… Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider answering Yes to Was this reply helpful? or give it a Like â™¥
    Visit my blog 
    Practical Power Apps    LinkedIn  
  • WarrenBelz Profile Picture
    152,667 Most Valuable Professional on at
    SharePoint Online list items loading is slow in PowerApps
    A quick follow-up to see if you received the answer you were looking for. Happy to assist further if not.
     
    Please ✅ Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider answering Yes to Was this reply helpful? or give it a Like â™¥
    Visit my blog
    Practical Power Apps    LinkedIn   

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

Coming soon: forum hierarchy changes

In our never-ending quest to improve we are simplifying the forum hierarchy…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 724 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 319 Super User 2025 Season 2

#3
SebS Profile Picture

SebS 239 Moderator

Last 30 days Overall leaderboard