Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid 3n requests for each project, in the project timeline web part #743

Closed
tarjeieo opened this issue Jun 27, 2022 · 1 comment
Closed
Assignees
Labels
enhancement Request that will enhance the product
Milestone

Comments

@tarjeieo
Copy link
Member

tarjeieo commented Jun 27, 2022

Is your feature request related to a problem? Please describe.
With the project timeline web part, there are excessive number of requests when loading the page. The web part is requesting 3 times per project in the list. This won't scale well for larger portfolios, and I was actually throttled at a customer because of this.

image

See:

Describe the solution you'd like
It should be possible to only have 3 requests in total, not 3 per project.

https://prosjektportalen.sharepoint.com/sites/pp365/_api/web/lists/getByTitle('Tidslinjekonfigurasjon')/items?$select=Title,GtSortOrder,GtHexColor,GtElementType,GtShowElementPortfolio,GtShowElementProgram,GtTimelineFilter&$top=500

and

https://prosjektportalen.sharepoint.com/sites/pp365/_api/contextinfo

only needs to be called once.

https://prosjektportalen.sharepoint.com/sites/pp365/_api/search/postquery with query DepartmentId:{b8899a70-4044-4aad-ab59-8401149cd53f} GtSiteIdOWSTEXT:{39535e58-f36d-4348-a634-dcbb4180b886} ContentTypeId:0x010022252E35737A413FB56A1BA53862F6D5* GtModerationStatusOWSCHCS:Publisert -ContentClass=urn:content-class:SPSPeople

can be merged into one large query with a Siteid:xxx per project, and then you have to handle the results and enrich the data model based on the returned results (see e.g. the program web parts).

In addition, there is a linebreak in the query which should be removed:
image

EDIT: Seeing that this is not related to newly added 1.6.0 feature, but still something to be looked into.

@tarjeieo tarjeieo added the enhancement Request that will enhance the product label Jun 27, 2022
@tarjeieo tarjeieo added this to the 1.6.1 milestone Jun 27, 2022
@Remi749 Remi749 modified the milestones: 1.6.1, 1.7.0 Jul 1, 2022
@tarjeieo tarjeieo modified the milestones: 1.7.0, 1.6.2 Jul 4, 2022
@okms okms modified the milestones: 1.6.2, 1.7.0 Aug 23, 2022
@Remi749
Copy link
Collaborator

Remi749 commented Sep 14, 2022

Done. TimelineConfig only gets called once. And getting the statusreports is only called once. the result is the following:

Before (84 calls) After (3 calls)
imageimage image

BIG IMPROVEMENT!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Request that will enhance the product
Projects
None yet
Development

No branches or pull requests

3 participants