[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: DOM vs JDOM
- From: Rick Jelliffe <ricko@allette.com.au>
- To: xml-dev@lists.xml.org
- Date: Fri, 16 Feb 2001 13:50:28 +0800
From: Uche Ogbuji <uche.ogbuji@fourthought.com>
>Cache management is quite a difficult area, but quite established, so I'd
>bet most persistent DOMs have such swapping schemes.
And, though perhaps this goes without saying, it is important to know_why_
saving memory is important for your application. Sometimes we consider
space important but we are really interested in time. In a web application
I worked on last year, we found that at quite a few points during the
application the middleware could prefetch data, which dropped response times
by 75% for those phases; the process that sends the page then prefetches
the data and has it ready in the user's session object. In that case, the
time to load data was not important because, by prefetching where it was
reasonable to do so, we had lots of time available.
On a related issue, size may also not be so important for summary data
required by users from a database, where many sessions need the summaries
and you can sacrifice tmieliness a little bit: caching the results of
summary queries on the middleware and aging it after 10 seconds (or
whatever) you can reduce db server congestion and decrease average response
times for users. If you have even 2 sessions that need that data during the
window you have already saved 50% on size, in effect, for that data. (For
one place we were able to do that, we found it dropped response times for
the page in question from 10 seconds every time to about .5 seconds best
case (10 seconds still the worst case, of course. If we had regularly
scheduled updates we could have decreased the worst case; for example using
the rule that if there are any active sessions that might soon need the
summary data then when cache is old wait the statistically optimal period
and update the cache: predictive prefetching. )
So DOM size is important, but if responsiveness is the concern then it can
be worthwhile to look at the possibilities for prefetching and for shared
query-result caching on your middleware too.
Cheers
Rick Jelliffe