I'm curious whether any one has tried caching the traversal compound path?
For example, could all content items have a cached full path and have lookup
first check if there is an item with that full path before beginning
traversal? I would think those full paths would only need to be re-done when
content moves or dies, which would be a lot less.

iain

On Wed, Oct 12, 2011 at 2:00 PM, Parnell Springmeyer <ixma...@gmail.com>wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Rob Miller <r...@kalistra.com> writes:
>
> > One thing worth noting when using traversal w/ SQL is that you often
> > pay a lookup penalty, since every part of the requested URL path
> > usually results in an additional database query (e.g. "GET
> > /foo/bar/baz" would be at least 3 queries).  And modeling trees in SQL
> > is trickier than it seems, it's easy to build inefficient lookups
> > (although to be fair usually "find child of X named Y" isn't too
> > heavy).
>
> The lookup penalty is very true - I make sure any lookups are *not*
> complex though; we only do simple look ups. Also, memcached is a very
> good friend too - most of the time it's basic access like
> "profiles/12/display" which change rarely and are easy to cache (because
> it's super easy to drop a cache region on top of the __getitem__ in a
> resource class).
>
> > This won't matter for many uses, but at scale it can have significant
> > impact.
> >
> > -r
>
> - --
> Parnell "ixmatus" Springmeyer (http://ixmat.us)
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
>
> iQEcBAEBAgAGBQJOlgABAAoJEPvtlbpI1POLMEsH/0l8da7iqflfAHf0hxqg0dTr
> VoruUeOY/cXylnZ378j1OWx6vXunNiGqddjB51tNuLw+rQZ8+P05aqvE79wf9YT4
> bcj1/1SkKgZ+eJmMPHeYUkPdgtyYgERHLsYmyfTIaeO+7thefBzk91QsNYV9zC2a
> OxdIYqF+giaf05PxY9klEiPFRktCW7SwSWUvYdNP4mPuBcwVESxgxjAV+qP2URld
> G14GKgauMm78g/59tXaJB5MwKQJOhqX9WFG8wlLVUklicxSHHTtcbrksgjDbOoFk
> Q+XQ5aBxl7rHs4t5R7TJIdofCjTN5VwjFkN3lFs1Hk5GG1daRzVy5KhqGfM5jFo=
> =soS8
> -----END PGP SIGNATURE-----
>
> --
> You received this message because you are subscribed to the Google Groups
> "pylons-discuss" group.
> To post to this group, send email to pylons-discuss@googlegroups.com.
> To unsubscribe from this group, send email to
> pylons-discuss+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/pylons-discuss?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to pylons-discuss@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-discuss+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.

Reply via email to