Giter Club home page Giter Club logo

Comments (5)

acoumb avatar acoumb commented on August 10, 2024

Hi @thenexus00 ,

With the latest version of the Shopify integration (detailed more here) we've introduced a new feature for products pagination based on the recommended approach from Shopify: https://shopify.dev/docs/api/usage/pagination-rest. Caching is no longer used, as the response we receive from Shopify takes into consideration a response header value for page info.

This isn't something I've experienced, but if you could provide me some additional context, like number of products, number of selected items, I could try and replicate your use case.

Maybe this asynchronous call in the converter does not complete in a reasonable time frame.

var t = Task.Run(async () => await _apiService.GetProductsByIds(ids));

var result = t.Result;

Adrian

from umbraco.cms.integrations.

thenexus00 avatar thenexus00 commented on August 10, 2024

Hi, @acoumb
https://www.enlighten.com.au/accessories
I have put some direct caching on the list and the view on these so any page load after is fast but you will see the delay.
There are only 30 products.
The issue is around the picker to fetch the data.

As you loop through and do:

var thisProduct = product.Value<IEnumerable<ProductViewModel>>("productSelection").FirstOrDefault();

  • FirstOrdefault() because you can associate multiple shopify products. If there are multiple shopify products it is even slower!
  • Literally just fetching variant info for the price and the image in this case so it is not a lot of data. If it was more and more SKU options it is even slower.

On investigation it is not the amount exactly but with certain products. There is no real difference in the Data processed but "Current Vico Models" for example increases the slow performance.
{ "id": 8602005209409, "title": "Current Vico Models", "body_html": "Battery pack for all Vico BL12++/BL06++ models, 6.4V 3000mAh LiFePO4", "vendor": "enLighten Australia", "status": "active", "tags": "", "variants": [ { "id": 46505610445121, "price": "71.50", "sku": "BL-Batt-Li", "position": 1, "barcode": "", "inventory_quantity": 72 } ], "image": { "src": "https://cdn.shopify.com/s/files/1/0793/5629/7537/files/BL-Batt-Li-v2.jpg?v=1708574123" } }

Remove this from the list and it does speed up.
Testing the API directly using Postman and just some products you request from shopify take longer to respond and sometimes the request just sometimes takes longer due to their queue system.

Based on all this I can see why pagination was required Adrian but I think that kind of just patches and underlining issue that some requests are slow.
So the core Data for products maybe needs to be on a schedule fetched and used or something different?
On a single product page it is fine, but for loops I think it is an issue for lists so a different method is needed.

from umbraco.cms.integrations.

acoumb avatar acoumb commented on August 10, 2024

Hi @thenexus00 ,

I will think of available options and get back to you with an answer.
In the meantime, if there's something you can spot and amend, PRs are most welcome.

Thanks,
Adrian

from umbraco.cms.integrations.

acoumb avatar acoumb commented on August 10, 2024

Hi @thenexus00 ,

Could you give me an update on this? Do you still experience issues?

Adrian

from umbraco.cms.integrations.

acoumb avatar acoumb commented on August 10, 2024

Closing this for now, please reopen if issue persists.

from umbraco.cms.integrations.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.