[drupal-devel] Fwd: history-table

Dries Buytaert dries at buytaert.net
Mon May 9 17:25:08 UTC 2005

On 09 May 2005, at 13:05, Gerhard Killesreiter wrote:
> We have two different implementations of checking the new-ness of a 
> node
> wrt the current user:
> _forum_user_last_visit selects all history entries and populates a
> static array when first called.
> and
> node_last_viewed will execute a query per nid (and cache the result in
> a static array too).
> We should find out which one is faster, use only that, and remove the
> other function (the new function should be in node.module of course).

That or _forum_user_last_visit() should only load/cache information 
about the nodes in the relevant forum (i.e. add a left join).  Even so, 
we risk doing some work twice.  We'll need to do some profiling for 
this ...

Dries Buytaert  ::  http://www.buytaert.net/

More information about the drupal-devel mailing list