lynx-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: lynx-dev PATCH [dev21]: source caching


From: Leonid Pauzner
Subject: Re: lynx-dev PATCH [dev21]: source caching
Date: Sun, 11 Apr 1999 12:47:09 +0400 (MSD)

10-Apr-99 23:59 Scott Bigham wrote:
> In this implementation, each document kept in cache has associated with it
> a temporary file containing the HTML source for the document (well, not all
> of them -- only those using the HTTP protocol, on the premise that file://
> documents are probably local and ftp:// documents are probably not HTML).
> The temporary file is deleted when the document is uncached.  For certain
> operations, instead of reloading the document via HTLoad<mumble>(), the
> source file is reparsed with HTParseFile().  The cached document also
> remembers certain parser settings (screen size, historical vs. minimal vs.
> valid comment parsing, and the like), and is regenerated from source if it
> is fetched out of cache under different settings.

Thanks a lot!
I found this feature very useful and vote to include it in dev22 immediately.

One (minor) problem: keeping a temporarily files for sources cache
we need to be sure to clean these files on exit. Currently it implemented
in HText_free() but atexit(free_all_texts) was recently ignored
without LY_FIND_LEAKS. Probably these files will be deleted by
clean_files() anyway, ha, don't forget to disable the feature
in NONINTERACTIVE mode - it will not clean temp files currently
(if should not create temp files, so a nice check that everything OK).
Also we increase disk activity which may be not good for users
under disk quota or leaving too much junk if lynx crash unconditionally.

> This behavior is selectable by a configure option --enable-source-cache and
> by a lynx.cfg option SOURCE_CACHE; I didn't add a command-line argument or
> an options menu entry, as this didn't seem to be the sort of thing one
> would want to change at runtime.

> Assorted notes:
>   - Oddly, some of the commands I modified reload the document by faking an
>     LYK_RELOAD, and some by calling HTuncache_current_document().  Any
>     particular reason for the difference?  I ask because the latter did the
>     HTuncache_...() before printing the associated message and I had to
>     move it after to get the reparse to work, and I probably did it wrong.
>   - I try to be intelligent about passing the source cache file along to
>     the newly generated HText, but I'm a bit nervous about passing it
>     around in a global variable...

> As always, apply with caution; I've almost certainly gotten something
> wrong.

> (I wonder if this is gonna start up that whole argument again....)

>                                               -sbigham


> --ATTACHMENT-- text file <source_cache.diff>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]