W3C home > Mailing lists > Public > www-lib@w3.org > July to September 1998

Re: Memory Cache in LineMode Browser

From: Steven Mak <steven@aucolinux.aucoasia.com>
Date: Mon, 17 Aug 1998 23:17:52 -0400 (EDT)
To: www-lib@w3.org
cc: frystyk@w3.org
Message-ID: <Pine.LNX.3.95.980818105556.10677A-100000@aucolinux.aucoasia.com>
Hello,

On Sun, 16 Aug 1998, Henrik Frystyk Nielsen wrote:

> At 07:44 8/12/98 -0400, Steven Mak wrote:
> >
> >	In the LineMode Browser, we can disable cache with
> >HTCacheMode_setEnable(NO). Is this only diable disk cache? Can I disable
> >the memory cache also? I don't mind how slow the browser it would be...
> >Or how can I change the libwww source code to disable memory cache?
> 
> Disk cache is separate from history buffering in memory. The latter is
> controlled by a hard-coded (!) number in
> 
> 	http://www.w3.org/LineMode/src/GridText.c
> 
> as far as I remember. Don't set it to less than 4-5 as this may cause
> problems.
> 

What is the number then? Is it LOADED_LIMIT? It seems that modifying this
number from 40 to 4 don't have much difference in memory usage.

> >	Also, when I am using the LineMode Browser, I see that memory
> >usage of that process is growing up as I navigate from one site to
> >another. Even though I flush the history list and use with '-nocache'
> >option, the memory usage still grows up. Is there any reason for that? I
> >would like to know if there is any upper bound for the amount of memory to
> >be used by the LineMode browser, or can we make a limit for that?
> 
> Not a strict limit - things like anchors and host information take up a
> small amount of memory - is this a problem?

However, the grow that I observed is in the order of ten KBs. Things like
anchors and host information won't take up so much memory. So, how memory
is being used up?

BTW, here is a snapshot in memory usage using ps -m when I use a static
version (for some reason, I can only compile statically. Also, the
quantity LOADED_LIMIT is set to 4 and '-nocache' is used) of the LineMode
browser to browser several websites.

step 1) www.w3.org, the starting point
  PID TTY MAJFLT MINFLT   TRS   DRS  SIZE  SWAP   RSS  SHRD   LIB  DT
11296  p3    104     61   412   176   588     0   588   396     0  48

step 2) www.netscape.com
  PID TTY MAJFLT MINFLT   TRS   DRS  SIZE  SWAP   RSS  SHRD   LIB  DT
11296  p3    105     79   416   244   660     0   660   400     0  65

step 3) www.microsoft.com
  PID TTY MAJFLT MINFLT   TRS   DRS  SIZE  SWAP   RSS  SHRD   LIB  DT
11296  p3    105    101   416   328   744     0   744   400     0  86

step 4) www.pathfinder.com
  PID TTY MAJFLT MINFLT   TRS   DRS  SIZE  SWAP   RSS  SHRD   LIB  DT
11296  p3    105    120   416   400   816     0   816   400     0 104

step 5) www.yahoo.com
  PID TTY MAJFLT MINFLT   TRS   DRS  SIZE  SWAP   RSS  SHRD   LIB  DT
11296  p3    105    142   416   484   900     0   900   400     0 125

step 6) www.w3.org
  PID TTY MAJFLT MINFLT   TRS   DRS  SIZE  SWAP   RSS  SHRD   LIB  DT
11296  p3    105    154   416   532   948     0   948   400     0 137

step 7) www.netscape.com
  PID TTY MAJFLT MINFLT   TRS   DRS  SIZE  SWAP   RSS  SHRD   LIB  DT
11296  p3    105    156   416   540   956     0   956   400     0 139

	From the above data, it can be seen that the DRS, data resident
size, is growing up in the order of KBs, from the starting 176KB to 540KB
for only seven visits. So, if caching only stores info like host
information and anchors, where do the several tens KBytes go?

			Thanks in advance
				Steven Mak
Received on Monday, 17 August 1998 23:59:43 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 23 April 2007 18:18:28 GMT