Hi!
Im working on a product catalog site holds up to 20000 items and my first thought was to use the document tree with TVs approach.
Is that right way in terms of frontend and backend performances or do i need special solution like creating catalog module or is there other way to manage the issue ?
Looking forward to hear any opinoins or ideas.
Thank you in advance!
-
MODX Staff
- 10,725 Posts
You’re asking for trouble indexing that many URLs within the current MODx cache file, which is what would happen. Every request would load several lines of data for each and every one of those 20000 items (and all the regular web pages).
This is clearly a case where you need to offload the catalog to a separate data table and use a script on a single web page (or a few category pages, etc.) to present the items. This will be much more efficient.
We’re working on many ways to reduce the cost of each request with large numbers of documents, including organizing the content into unique contexts that can be loaded on demand, as well as additional cache functionality; you’ll see these features and many more when 0.9.7 is released to the public.
Thank you for reply
Im a bit confused, could you describe it more in details "offload the catalog to a separate data table and use a script on a single web page (or a few category pages, etc.)" ? It means that i need to create a module to manage the category items ?
I don’t want to speak for OpenGeek as he knows vastly more than me, but I think he might be suggesting creating a separate table in your database and then using a snippet or suchlike to retrieve the data. I don’t know how you’d populate it in MODx, though.
if it is about creating separate table for the catalog items, then how the items can be managed(adding, editing items) ? is there a way to use separated tables for parts of the document tree, like sharing storage of the document tree nodes within modx database tables?
Actually, i have been thinking about an alternative way to create a catalog module in case of the document tree and TVs aproach is not suitable for catalogs up to 20000 items.
-
☆ A M B ☆
- 24,524 Posts
You can see how to make a module to manage a separate database table in my site demo; there are three tutorial articles as well as demo modules in my Manager. See my sig for manager login details.
Thank you for reply
Actually i wanted to clarify what is the best solution for this issue, it seems better creating a modul for the catalog.
Susan: are there likely to be any issues with 0.9.7 in terms of creating and using modules? I’ve been sitting on a lot of developments until I see what changes 0.9.7 brings, and I seem to recall mention of modules changing.
-
☆ A M B ☆
- 24,524 Posts
I have to say that I still don’t have a handle on 0.9.7. Jason (OpenGeek) is pretty much the head honcho for that, at least as far as I know, and there are a few others on the dev team that are working on it as well. They’d know a lot more about how it works than I do... I still can’t get it to install properly to begin with, let alone understand the xPDO underpinnings! All this newfangled object-oriented stuff! I just got off GOTO statements