[WM] Webmake performance

Oliver Strutynski olistrut.gmx.net
Wed Nov 20 13:42:02 GMT 2002


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I downloaded wm 2.3 today - same problem. Digging deeper into the code, I 
found however what's causing my problems (at least with my simple webmake 
file): When the output file is not changed, webmake does not re-write the 
dependency/metadata information in the cache db. This is correct. If however, 
the cache is not set-up, there is no dependency information available 
(correct) and is never written because the output file is up to date. I 
suppose this all happened because when I switched to the simple webmake file, 
my more complicated webmake file already created all the output files (+ some 
more).

Deleting both the cache db AND the out directory did the job.

BTW: Is it really a good idea to compare the generated file with the existing 
output file? It probably is pretty time-consuming and since webmake usually 
does a good job with dependency analysis it should only process a file it it 
has changed. That leaves the case where a file has changed (or has a new 
time-stamp) but the output remains the same. Is this really a common case?

Now, with above solution, that still leaves a problem with my more complicated 
webmake file:

In the webmake file I read meta-information (section name) on all file in the 
all_files list. (All files is a filtered list of files that contain no 
dynamic content).

 <{perl
    my @all_files = get_list("all_files");
    my %sections;
    foreach my $pg (@all_files) {
      my $sect = get_content ($pg . ".section");
      push (@{$sections{$sect}}, $pg);
    }
    my @section_names = sort keys %sections;
    foreach my $sect (@section_names) {
      set_content ("section_stories_$sect", join (' ', @{$sections{$sect}}));
    }
    '';
  }>

(This is modeled after the newssite_with_sections example.)

Now for getting file.section, the file is opened and parsed. The dbg message 
is "subst from eval code (always rebuilt)". This should not happen as the 
system knows that the files have no external dependencies. Later when looking 
at the files in all_files in a FOR-loop  webmake correctly sees that the 
files have not been changed and have no external dependencies.

Any way to work around that?

Oliver Strutynski

- -- 
_____________________________________________________________________
 Oliver Strutynski                       oliver.strutynski at in.tum.de
                                                    olistrut at gmx.net

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE93AD4uUAlUEFqtKYRAk/CAJ9Gc3SbQcj/TlIbNnRMAgzkaGdQnQCgjX6k
a/eZlJO1724VAfjXfMxiXt4=
=WygF
-----END PGP SIGNATURE-----





More information about the Webmake-talk mailing list