Developer forum

Forum » Rapido » Product feed initialization slow

Product feed initialization slow

Andrew Rushworth
Reply

Hi All,

I'm experiencing slow product feeds. I've stripped down the feed, excluding variants, etc - size is now 222k from 700k, but the feed still takes long to run 8-10s.

Even when I take out all feed out it still takes long to run - so I'm leaning towards the query that the feed runs off to be the issue.

https://www.arcstore.co.za/arc-sale-july-2024?feed=true&DoNotShowVariantsAsSingleProducts=True

running version 9.5.13

Any ideas on how to improve this?

Thanks,
Andrew


Replies

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

Hi Andrew

The URL you provide is a feed version of a regular page with a lot of paragraphs.

You can see what takes the time by adding &debug=true to the URL: arc-sale-july-2024?feed=true&DoNotShowVariantsAsSingleProducts=True&debug=true

1,2s of the execution is the facets (which are not used in the feed). But the facets are there because the page uses them.

Furthermore the remainder of that page also causes some performance issues - you have 4 catalogs on the page.

So if you really need to speed up the feed, you might want to create a specific page optimized for that need only, and then use that.

Yet an other alternative - depending on your use case - is to fetch the products on the web api: https://www.arcstore.co.za/dwapi/docs/ - using this endpoint. 

/dwapi/ecommerce/products/search

It need some parameters to be setup to return the same products from the same index.

 
Andrew Rushworth
Reply

Hi,

Thanks Nicolai. Yes I Already looked at debug=true.

I also removed all data from the feed and it was still taking 8-9seconds to just run the query returning no output. The customer uses a single Product Index and Queryso it has everything in it which is most likely the issue.

Removing that last catalogue (the one using this feed) from the page makes a huge difference, so I'll look at optimizing that and see where that takes me.

Thanks,
Andrew

 
Andrew Rushworth
Reply

Hi,

I found the main issue on this page is that we added a sort to the product catalogue:

With the sort the feed takes 8.38s, and without the sort it takes 1.89s.

I"ve left the rest of the page untouched and it is loading significantly faster.

Is there somethign I can do to improve the sort either on the index or a db index?

 

 
Andrew Rushworth
Reply

Incidently we are ordering by stock descending.
If you order by stock ascending it is fast, but reverse orderign runs 4x slower.

 
Andrew Rushworth
Reply

I fixed the stock ordering issue by creating a dummy field on products called stockInverse. I then set this to be (Stock * -1). You can then order by this field ascending and achieve the same results as ordering by Stock descending.

 

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

Hi Andrew

Thanks for sharing - and good workaround that could be helpful for others!

BR Nicolai

 

You must be logged in to post in the forum