aemsites / danaher-abcam

Apache License 2.0
0 stars 0 forks source link

[On Hold] [Products] Items with many Publications slow to load #12

Open davenichols-DHLS opened 1 month ago

davenichols-DHLS commented 1 month ago

If you look at the list of items:

https://main--danaher-optimus--aemsites.hlx.page/en-us/search

If you pick out the pages with many publications then they are slower to load and the page speed is terrible. I think this is due to the API call being huge. I'm just listing this as an issue.

image

Rajesh-GSPANN commented 1 month ago

Hi @davenichols-DHLS , We have looked in to the issue, When we load the search page, It is loading quick and also tried on other couple of machines , still we are able to load page. Can you please us with the steps to replicate, if you are still facing issue.

Thanks!

CC: @Meenu-GSPANN @amlan18041996

davenichols-DHLS commented 1 month ago

@Rajesh-GSPANN , @amlan18041996 and @Meenu-GSPANN . You can actually see the product pages loading slower, not the search results. I was showing an example of links that have many publcations.

As an example, 3,000 publications is slow and gets a page speed of 68: https://pagespeed.web.dev/analysis/https-main--danaher-optimus--aemsites-aem-page-products-detail-histone-h3-antibody-nuclear-marker-and-chip-grade-ab1791/evofukkwc3?form_factor=mobile

Compare that to 75 publications, which is faster to load and gets a page speed of 96: https://pagespeed.web.dev/analysis/https-main--danaher-optimus--aemsites-aem-page-products-detail-cytokeratin-8-antibody-ep1628y-cytoskeleton-marker-ab53280/ta0sphrhcj?form_factor=mobile

FYI @rgravitvl , @sharanagoudapatil.

Rajesh-GSPANN commented 1 month ago

Started Looking into this - In the initial analysis found out that, in mobile view content is consuming more space and causing the slow load.

davidzochowski commented 1 month ago

The issue is that all 3000+ publications are part of the product object from Coveo and so when the query to Coveo is made, the returned object is very large compared to other products (2.4 MB). I'm not immediately sure what we can do about this. I'm open to suggestions.

Rajesh-GSPANN commented 1 month ago

Hi @davidzochowski , I would suggest we have different API calls. Existing API to get the PDP details, in that we can have only 2 to 5 records of the publications and another API to get all the publications. @rgravitvl @amlan18041996 @pardeepgera23 please add your suggestions if you have any. We can have a schedule a call to discuss more on this if needed.

CC: @davenichols-DHLS @Meenu-GSPANN

Thanks!

davidzochowski commented 1 month ago

I don't know if we can get a subset of a field. Afaik, it is an all or nothing type of deal. I have raised a ticket with Coveo to see if they have a solution for this. I will let you know what they come back with.

Rajesh-GSPANN commented 3 weeks ago

Hi @davidzochowski , you have mentioned in our conversation last time we had as below, We won't be able to get a subset of publications, it's an all or nothing thing. We could do 2 api calls however that would eat up our QPM if we were forced to have 2 api calls per pdp when this really only affects less than 1% of products. If we do this, we might want to do the same as we do with lsig and have cloudflare cache the call to prevent the spike in query usage.

Did you get a chance to discuss with @davenichols-DHLS . We can hop on a call and discuss further.

CC: @Meenu-GSPANN @pardeepgera23 @rgravitvl @sharanagoudapatil @shivangi1422 @venkateshamkeerthi