forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tim Williams" <>
Subject Locationmap Caching Help (FOR-732/711)
Date Mon, 27 Mar 2006 01:08:03 GMT
I've been looking into FOR-711 [1]/FOR-732 [2] and I'm in need of some
new thoughts on the subject.  My "fix" for FOR-732 (changes to
locationmap having no effect) has effectively reversed much of the
benefit of caching the responses to begin with.  I'll explain...

The highlights of what I've done:
o) Created isValid() on AbstractNode.
o) Implemented isValid() on each node as appropriate.
o) LocationMapModule now tests whether caching is turned on &&
isValid() before returning a cached result.
o) If the traversed isValid() returns an invalid result back to the
Locationmapmodule, the cache is flushed.

The results I'm seeing: Slow, but the correct behavior... did I
mention slow [3]?

I thought maybe I was doing something wrong so I looked a little more
and it seems the node traversal is trivial.  The validity test itself
on MountNodes is even trivial.  So what's the issue?  I'm seeing ~315
input module requests per page and I reckon when you add up all those
"trivial" amounts of time the aggregate is not-so-trivial.

So what to do and what am I asking?  I'm thinking I might just be in a
"rut" in my thinking, maybe there's just a much better way to do this.
 I wish I could only do the validity test once per http request vs
every lm request but I don't see that is really intended to support
such.  I've looked into putting the cache in the cocoon store but that
won't make a whole lot of difference I think even if we were to
implement our own store because it seems to me it's the sheer number
of accesses that's the issue rather than storage location.  Having a
configurable timeout (so that validity tests are only done every X
number of minutes) would help but seems ultra-hacky.  So I'm asking
for new thoughts, ideas, suggestions for alternative approaches.

Any/All input is appreciated...

[1] -
[2] -

[3] - No hyperlink, just look below;)

These were runs of 'forrest site' on Fresh Site.  While the tests were
unscientific, I think it does give a good idea of what I'm seeing.

1) 62 seconds
2) 62 seconds
3) 61 seconds

Cached *without* Validity tests:
1) 28 seconds
2) 29 seconds
3) 28 seconds

Cached *with* Validity tests:
1) 49 seconds
2) 44 seconds
3) 43 seconds

View raw message