Closed (fixed)
Project:
Relevant Content
Version:
6.x-1.x-dev
Component:
Documentation
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
8 Nov 2008 at 21:26 UTC
Updated:
30 Dec 2008 at 06:20 UTC
hi, this is once again amazing - using the cck implementation and now have a lingering question: does the lookup for related content run upon node creation (when user hits save) and in turn potentially slow down submission, or is this running at some other time? and once the similar content is presented, is the cck field (or block) constantly running a query to update relevant content to get newer or more relevant items?
just wondering how this works mechanically, if it can be set to run lookups at cron (as opposed to upon node creation) or something to this effect..
any insights appreciated. thanks.
Comments
Comment #1
nicholasthompsonIt runs the query on each generation of the field.
The result of CCK fields are cached. The result of the block can also be cached (on a per page basis...).
Saying this - the performance hit is very negligable. I've tested the query on a large database and on that system, my cache_get() requests were taking longer than the SQL to generate the relevant nodes. It is very lightweight in that respect.
The problem with generating on cron or submission is that data changes. I could node X and say its related to A, B & C - but then if you submit node Y then that could effect the relevant node result set for node X - maybe Y is more relevant than A, B or C...
Comment #2
zilla commentedso if it's running on generation of the field, then does that mean that it will update over time when the page is requested and there are newer or more relevant pieces of content? i'm a bit confused about how it updates over time...
Comment #3
nicholasthompsonYes.
Basically, any caching is handled by CCK. Whenever you add a new node, the existing content on other nodes will update either when the cache expires or when you empty the cache.
The NodeReferrer module actively clears the cache on nodes which are involved (ie, it does a two-way lookup and clears the cache for any node which is referenced or being referred to).
Unfortunately, due to the dynamic nature of Relevant content, there is no easy way to clear the cache for targetted nodes as the module would have to look up on ALL nodes to see which ones are involved and need clearing... It would be far more efficient to simply empty the cache.
Comment #4
nicholasthompsonMarking as fixed - there appear to be no more questions.