texmacs-dev
[Top][All Lists]
Advanced

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

Re: [Texmacs-dev] disk caches and startup time


From: Joris van der Hoeven
Subject: Re: [Texmacs-dev] disk caches and startup time
Date: Wed, 26 May 2004 12:04:40 +0200 (CEST)

On Tue, 25 May 2004, David Allouche wrote:
> Compile with "make fill_mem".

Small question: why does this work (and not the usual
gcc fill_mem.c -o fill_mem); I don't see any makefile?

> Run as "./fill_mem 1024" if your system
> has 1024 MB of RAM. Do not run with a parameter which is much bigger
> than your RAM or you will likely throw your system into endless
> thrashing.

Thanks for the program. I have added some timing code in file.cpp.
I obtain the following result after flushing the memory (this does
not take into account loading scheme files):

address@hidden src]$ texmacs --debug-bench
Bench  ] Initialized plug-ins in 6267 ms
TeXmacs] loading ecrm11 at 300 dpi
TeXmacs] With linked TrueType support
Evaluating user init-texmacs.scm
Bench  ] Initialized scheme in 3040 ms
TeXmacs] Loading hyphen.us
TeXmacs] loading ecrm10 at 600 dpi
Evaluating user init-buffer.scm
Bench  ] Loaded 90 files in 197 ms
Bench  ] Loaded 393 directories in 3778 ms
Bench  ] Issued 8242 stat commands in 3245 ms

When launching a second time, one obtains

address@hidden src]$ texmacs --debug-bench
Bench  ] Initialized plug-ins in 506 ms
TeXmacs] loading ecrm11 at 300 dpi
TeXmacs] With linked TrueType support
Evaluating user init-texmacs.scm
Bench  ] Initialized scheme in 1809 ms
TeXmacs] Loading hyphen.us
TeXmacs] loading ecrm10 at 600 dpi
Evaluating user init-buffer.scm
Bench  ] Loaded 90 files in 25 ms
Bench  ] Loaded 393 directories in 8 ms
Bench  ] Issued 8242 stat commands in 220 ms

Conclusion: loading files is not the main bottleneck.
We should optimize loading directories and using the stat command.
It may even be that we launch the same commands several times,
so using a cache (at least at start-up) would probably be a good idea.
We might also try to eliminate reading directories and issuing stat
commands for files which come with the distribution, by shipping TeXmacs
with a pre-generated index.

Note: the benching code is on the CVS.





reply via email to

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