On Thu, 27 Jul 2000, Jauder Ho wrote:
> If there was somehow a way to cache say the template, leaving only the same
> dynamic portion uncached, it would certainly help things along quite a bit.
An improvement to the technique used by HTML Tree is to
"collapse" the non-dynamic portions of an HTML file into a
single text node. Given:
<H1>Heading</H1>
This is ordinary content.
It is <B>not</B> dynamic.
This line, <SPAN CLASS="sub_word">however</SPAN>, is.
You would ordinarily get:
Element Node: <H1>
Text Node: Heading
Text Node:
This is ordinary content.
It is
Element Node: <B>
not
Text node: dynamic. This line,
Element Node: <SPAN>
Text Node: however
Text Node: , is.
But, since the bulk of that is static, the portains that do
*not* contain elements having CLASS attributes could be
"collapsed" so that you get:
Text Node:
<H1>Heading</H1>
This is ordinary content.
It is <B>not</B> dynamic. This line,
Element Node: <SPAN>
Text Node: however
Text Node: , is.
i.e., the non-synamic HTML elements can be treated just like
plain text and passed through untouched. You could also devise
a more complicated data structure that would cache such nodes
separately.
- Paul