cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
rajeshtechgeek
Level: Powered On

Due to increase in the list data (above 5000) of SharePoint, we are facing performance issues in the powerapp's project

Due to increase in the list data (above 5000) of SharePoint, we are facing performance issues in the power app's project.

Few activities we have done to improve its performance:

1) Implemented concurrent on collects

2) Implemented cache

But performance issue is the same.

12 REPLIES 12
TheRobRush
Level 8

Re: Due to increase in the list data (above 5000) of SharePoint, we are facing performance issues in the powerapp's project

This is to be expected unfortunately. The larger a sharepoint list is the more issues it will present. If not all the data on the list is current and impactful to your app, what I have done for my apps is setup a flow every night that takes any data outside of say, the last 60 days, and moves it to an identical sharepont list named MYLISTARCHIVE. Then my apps look only at recent data, which drops the item count and makes sharepoint behave far better. When they released the ability to up the item count it came with a warning that setting it too high would cause performance issues.

Special_K
Level: Powered On

Re: Due to increase in the list data (above 5000) of SharePoint, we are facing performance issues in the powerapp's project

@TheRobRush - I'm planning on doing this with my app & SP list data sources but I haven't built the Flow yet. Any chance you'd be willing to share your Flow setup? Both lists are setup - just need to build the Flow to move the items. 

TheRobRush
Level 8

Re: Due to increase in the list data (above 5000) of SharePoint, we are facing performance issues in the powerapp's project

Yes.

Not at the office right now but can show you a better look at it tomorrow...

But the gist of it is.

Set schedule
Define cutoff date
Get items in list older than cutoff date
For each item add new item into archive list
For each item delete from old list
Then it ends.

With 5k+ items already existing you should start by creating a template from current list and selecting include items in list... Create archive from that template and delete the newer items by hand. (Because the flow will only do 200 or so at a time so with that many in your list youd have to run it back to back a LOTTTTT of times to catch up so easier the way i said with template including items)
rajeshtechgeek
Level: Powered On

Re: Due to increase in the list data (above 5000) of SharePoint, we are facing performance issues in the powerapp's project

Thanks for valuable information, however, after archive the list, still we have 4000 items and powerapp's project performance is very much down.

Currently, we are fetching records from multiple and onvisible property of Screen, we have written below code:

 

UpdateContext({IsSaveDisabled: 0});
Set(
    _UserEmail,
    Office365Users.MyProfile().Mail
);
Concurrent(
Set(
    _ROEmail,
    First(
        Filter(
            Users,
            _UserEmail in UserEmail
        )
    ).ROEmail
),
Set(
    _IsROUserId,
    First(
        Filter(
            Users,
            _UserEmail in ROEmail
        )
    ).ID
));
ClearCollect(
    clConfiguration,
    Configuration
);
If(
    DateValue(
        Text(
            First(
                Filter(
                    clConfiguration,
                    "EndDate" in Key
                )
            ).Value
        )
    ) < Now(),
    UpdateContext({_DisableSubmit: true}),
    UpdateContext({_DisableSubmit: false})
);
UpdateContext({IsSaveDisabled: 0});

Clear(clUserSkillSet);
Clear(clUserSkillSetsNewID);
Clear(clSubCategory);
Clear(clCategory);
Clear(clIsApproved);
ClearCollect(
    clSkillLevel,
    Distinct(
        SkillSets,
        SkillLevelSet
    )
);
ClearCollect(
    clPracticeCol,
    Table({Result: "Select Practice"})
);

ForAll(
    'User-SkillSets',
    If(
        Value(UserID.Value) = _UserID && Value(ID) > 0,
 Concurrent(
        Collect(
            _Category,
            SkillSetID
        ),
        Collect(
            clIsApproved,
            If(
                Text(SubmitStatus.Value) = "Submit" && "false" = Text(IsROApproved),
                ID
            )
        ),
        Collect(
            clUserSkillSet,
            Table(
                {
                    ID: Value(ID),
                    UserSkillSetID: Value(SkillSetID.Value),
                    Practice: Text(SkillSetID_x003a_Practice.Value),
                    Category: Text(SkillSetID_x003a_Category.Value),
                    SubCategory: Text(SkillSetID_x003a_SubCategory.Value),
                    PoCCompleted: Lower(Text(POCCompleted)),
                    SingleProject: Lower(Text(SingleProject)),
                    TrainingGiven: Lower(Text(TrainingGiven)),
                    IsCertified: Lower(Text(IsCertified)),
                    IsROApproved: Lower(Text(IsROApproved))
                }
            )
        )
  )
    )
);


Reset(rdSkillSetCategory)

 

This code is working fine till we have 1500 items in the lists.

TheRobRush
Level 8

Re: Due to increase in the list data (above 5000) of SharePoint, we are facing performance issues in the powerapp's project

You are never gonna have it work perfectly if powerapps is pulling 4,000 items in at a time. Don't want to be negative but thats just not what it is designed to do. Some performance impacts can be lessened by using sharepoint delegable filters on the powerapps side, but even then with 4k items in your list sharepoints going to have some issues occasionally, especially in speed of return.
TheRobRush
Level 8

Re: Due to increase in the list data (above 5000) of SharePoint, we are facing performance issues in the powerapp's project

Maybe try indexing a column you can filter by and always return fewer results. That would help.
TheRobRush
Level 8

Re: Due to increase in the list data (above 5000) of SharePoint, we are facing performance issues in the powerapp's project

Another workaround is to bit by bit retrieve the entire sp list into a collection in powerapps. If you collect it in parts instead of all at once you have less issues... Coding its a bit of a pain though.
Highlighted
Special_K
Level: Powered On

Re: Due to increase in the list data (above 5000) of SharePoint, we are facing performance issues in the powerapp's project

@TheRobRush - this sounds easy enough. Mine is based on a status vs. a date and thankfully this is a brand new process so we won't have issues archiving many records up front. The first 2 went into 'Closed' status yesterday actually. Technically I never expect to see more then 50 or so records open at a time but I didn't want to run into the threshold limits or performance issues (in the app) further down the line (by housing Open & Closed all in one list) so I'm building the solution out now for scalability later on.

 

If you don't mind sharing screenshots of the flow, I'm sure that would help me speed up my build. I haven't done several other Flows but haven't built an add or delete Flow yet. 

TheRobRush
Level 8

Re: Due to increase in the list data (above 5000) of SharePoint, we are facing performance issues in the powerapp's project

@Spelo 

Untitled.png

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

Top Kudoed Authors
Users Online
Currently online: 377 members 4,529 guests
Please welcome our newest community members: