Developer forum

Forum » CMS - Standard features » Performance Issues using Item Lists

Performance Issues using Item Lists

Søren Heide Larsen
Søren Heide Larsen
Reply

Hi,

Our front-end developers have grown very fond of Item Lists as they are easy to fill data into and use, however, it seems like they trigger a lot of SQL Queries.

I have ensured that all items involved have "Cached" enabled, but they still come, any advice?

/Søren

item_list_quer.png

Replies

 
Martin Vang
Martin Vang
Reply

Hi Søren,

All items are cached in 9.3. You should upgrade to get the performance boost. The old implementation is... not that good - and will not be hotfixed.

Starting from 9.3, the option to NOT cache items has also been removed. The caching should now work in a way that is consistant with how everything else is cached.

Please let me know how you like the new approach. We're in the process of doing the same to a (sub)section of Ecommerce.

BR

Martin

 

 
Søren Heide Larsen
Søren Heide Larsen
Reply

Ok, I will try to update from 9.2 to 9.3 and let you know the results :)

 
Søren Heide Larsen
Søren Heide Larsen
Reply

Hi Martin,

We tried upgrading now and so far it seems to be a lot better,  the SQL calls are greatly reduced and the overall page feels faster.

We had some issues with front-end not working with dropdown lists, but this was because we used GetValue. I changed it:

from: Model.Item.GetString("Type")
to: Model.Item.GetValue<ListViewModel>("Type").SelectedValue

which made it work, but I would recommend that you overwrite ToString() to make it easier for other customers to migrate in case they use the same method as we did :)

I still see some SQL calls which are called every single time on the page, which you proberly could cached as well:

  • DECLARE @p0 INT = 50
    SELECT * FROM [ItemList] WHERE ( [ItemList].[ItemListId] = @p0 )
  • DECLARE @p0 INT = 50
    SELECT [ItemListRelationItemId] FROM [ItemListRelation] WHERE ( [ItemListRelationItemListId] = @p0 ) ORDER BY [ItemListRelationSort] ASC
  • DECLARE @p0 INT = 51
    SELECT * FROM [ItemList] WHERE ( [ItemList].[ItemListId] = @p0 )
  • ...

 

/Søren

 
Martin Vang
Martin Vang
Reply

Hi Søren,

Good to hear from you. Yes, I agree that we are in no way "done" with caching improvements. So far, our priority is to make product/ecommerce related "entities" faster/cached correctly, so it will take a bit of time before we get to look at that specific database call.

We do take a profiling-run of the frontend every now and again, so these database calls should be caught eventually.

we will take a look at your suggestion regarding ToString on viewmodels. It was not something we considered a prime usecase, as a viewmodel does not, as such, represent a "value object" that is easily tostring-able. Your concrete example is fairly straightforward, though. :)

BR

Martin

 

You must be logged in to post in the forum