Closed frread closed 1 month ago
Hi, after reviewing your code that seems to be the correct way to do it.
With that said, your solution could be optimized. Currently you are executing are single request for each file, which is likely the cause of all your performance/timeouts you mentioned in your issue. This would be a great place to do a batch call instead.
You can do batch calls of up to 100 calls at a time through a single request. This would reduce your overall calls from 4,000, down to 40.
Please see our documentation on batching. https://pnp.github.io/pnpjs/concepts/batching/
I'm going to close this issue as answered. If you have further issues, please feel free to create a new issue and reference this one.
This issue is locked for inactivity or age. If you have a related issue please open a new issue and reference this one. Closed issues are not tracked.
What version of PnPjs library you are using
3.x
Minor Version Number
20
Target environment
SharePoint Framework
Additional environment details
I am creating a SPFX WebPart that runs on Sharepoint Online.
Question/Request
I am doing a Search for files and was working correctly, For the files its important that i reflect the last update date that the file was modify by anyone but an app we have thar runs in the backend.
So what i am doing is, i am getting the ModifiedBy field, but i have run into somes Problems with this.
Here are some examples of my code
async function mapResultToDoc(item: IExtendedSearchResult, rowNum: number, _sp: SPFI): Promise {
}
is there a way i could bring the version history with one request for each file, as maybe a subobject?