| 1 |
|
| 2 |
<HTML> |
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
<HEAD> |
| 29 |
<TITLE>5.7 Efficiency Notes</TITLE> |
| 30 |
<STYLE TYPE="text/css"> <!-- A {text-decoration: none} // --> </STYLE> |
| 31 |
</HEAD> |
| 32 |
<BODY BACKGROUND="binary/background.gif" |
| 33 |
BGCOLOR="#FFFFFF" |
| 34 |
TEXT="#000000" |
| 35 |
VLINK="#660000" |
| 36 |
LINK="#FF0000" |
| 37 |
ALINK="#CC0000"> |
| 38 |
|
| 39 |
<TABLE WIDTH="490"> |
| 40 |
<TR> |
| 41 |
<TD WIDTH="130" VALIGN="top"> |
| 42 |
<IMG SRC="binary/d_clear.gif" ALT="" WIDTH="130" HEIGHT="1"><BR> |
| 43 |
|
| 44 |
<FONT SIZE="2"> |
| 45 |
<BR> |
| 46 |
|
| 47 |
<A HREF="http://www.ross.net/" |
| 48 |
TARGET="rosshome" |
| 49 |
onClick="window.open('','rosshome','location,status,menubar,scrollbars,resizable',false).focus(); return true;" |
| 50 |
> |
| 51 |
<IMG SRC="binary/rossnet_logo.gif" |
| 52 |
WIDTH="64" HEIGHT="32" |
| 53 |
BORDER="0" ALT="RossNet" |
| 54 |
HSPACE="0" VSPACE="1"></A><BR> |
| 55 |
<BR> |
| 56 |
|
| 57 |
<A HREF="../index.shtml" |
| 58 |
TARGET="funnelweb" |
| 59 |
onClick="window.open('','funnelweb','location,status,menubar,scrollbars,resizable',false).focus(); return true;" |
| 60 |
> |
| 61 |
<IMG SRC="binary/linklogo.gif" |
| 62 |
WIDTH="64" HEIGHT="32" |
| 63 |
BORDER="0" ALT="FunnelWeb" |
| 64 |
HSPACE="0" VSPACE="1"></A><BR> |
| 65 |
<BR> |
| 66 |
<TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0><TR><TD BGCOLOR="#000000"> |
| 67 |
<A HREF="../reference/index.html" |
| 68 |
TARGET="funnelwebreference" |
| 69 |
onClick="window.open('','funnelwebreference','location,status,menubar,scrollbars,resizable',false).focus(); return true;" |
| 70 |
><FONT COLOR="#FFFFFF"><B>Reference</B></FONT></A><BR> |
| 71 |
<BR> |
| 72 |
<A HREF="../developer/index.html" |
| 73 |
TARGET="funnelwebdeveloper" |
| 74 |
onClick="window.open('','funnelwebdeveloper','location,status,menubar,scrollbars,resizable',false).focus(); return true;" |
| 75 |
><FONT COLOR="#FFFFFF"><B>Developer</B></FONT></A><BR> |
| 76 |
<BR> |
| 77 |
<A HREF="index.html"><FONT COLOR="#FFFFFF"><B>Tutorial</B></FONT></A><BR> |
| 78 |
<A HREF="intro.html"><FONT COLOR="#FFFFFF">1 Introduction</FONT></A><BR> |
| 79 |
<A HREF="macro.html"><FONT COLOR="#FFFFFF">2 Macros</FONT></A><BR> |
| 80 |
<A HREF="type.html"><FONT COLOR="#FFFFFF">3 Typesetting</FONT></A><BR> |
| 81 |
<A HREF="example.html"><FONT COLOR="#FFFFFF">4 Example</FONT></A><BR> |
| 82 |
<A HREF="hints.html"><FONT COLOR="#FFFFFF">5 Hints</FONT></A><BR> |
| 83 |
<A HREF="examples.html"><FONT COLOR="#FFFFFF">6 Examples</FONT></A><BR> |
| 84 |
<A HREF="web.html"><FONT COLOR="#FFFFFF">7 Webmaking</FONT></A><BR> |
| 85 |
|
| 86 |
<BR> |
| 87 |
<A HREF="search.html"><FONT COLOR="#FFFFFF"><B>SEARCH</B></FONT></A><BR> |
| 88 |
</FONT> |
| 89 |
</TD></TR></TABLE> |
| 90 |
|
| 91 |
|
| 92 |
</TD> |
| 93 |
<TD WIDTH="360" VALIGN="top"> |
| 94 |
<FONT SIZE="3"> |
| 95 |
|
| 96 |
|
| 97 |
<A HREF="../reference/index.html"><IMG SRC="binary/title.gif" |
| 98 |
WIDTH="302" HEIGHT="24" |
| 99 |
BORDER="0" ALT="FunnelWeb Tutorial Manual" |
| 100 |
HSPACE="0" VSPACE="0"></A> |
| 101 |
<P><FONT SIZE="5">5.7 Efficiency Notes</FONT><BR> |
| 102 |
|
| 103 |
|
| 104 |
|
| 105 |
<P>The following notes are worth keeping in mind when |
| 106 |
using FunnelWeb. |
| 107 |
|
| 108 |
<P><BLOCKQUOTE><B>Memory:</B> When |
| 109 |
FunnelWeb processes an input file, it reads the entire input |
| 110 |
file, and all the included files into memory. (Note: If a |
| 111 |
file is included n times, FunnelWeb keeps n copies in |
| 112 |
memory). This organization does not pose a constraint on |
| 113 |
machines with large memories, but could present a problem on |
| 114 |
the smaller machines such as the PC.</BLOCKQUOTE> |
| 115 |
|
| 116 |
<P><BLOCKQUOTE><B>Speed:</B> FunnelWeb is not a |
| 117 |
slow program. However, it is not particularly fast either. |
| 118 |
If the speed at which FunnelWeb runs is important to you, |
| 119 |
then the thing to keep in mind is that FunnelWeb has been |
| 120 |
optimized to deal efficiently with large slabs of text. |
| 121 |
FunnelWeb treats input files as a sequence of text slabs and |
| 122 |
special sequences (e.g. <SAMP>@+</SAMP>) and whenever it hits |
| 123 |
a special sequence, it has to stop and think. Thus, while a |
| 124 |
ten megabyte text slab would be manipulated as a single |
| 125 |
token, in a few milliseconds, a similar ten megabyte chunk |
| 126 |
filled with special sequences would take a lot longer. If |
| 127 |
FunnelWeb is running slowly, look to see if the input |
| 128 |
contains a high density of special sequences. This can |
| 129 |
sometimes happen if FunnelWeb is being used as a backend |
| 130 |
macro processor and its input is being generated |
| 131 |
automatically by some other program.</BLOCKQUOTE> |
| 132 |
|
| 133 |
<P><BLOCKQUOTE><B>Macro |
| 134 |
expansion:</B> When tangling |
| 135 |
(expanding macros), FunnelWeb never expands a macro |
| 136 |
expression into memory; it always writes it to the product |
| 137 |
file as it goes. This is a powerful fact, because it means |
| 138 |
that you can write macros containing an unlimited amount of |
| 139 |
text, and pass such macros as parameters to other macros |
| 140 |
without becoming concerned about overflowing some kind of |
| 141 |
buffer memory. In short, FunnelWeb does not impose any |
| 142 |
limits on the size of macro bodies or their expansions.</BLOCKQUOTE> |
| 143 |
|
| 144 |
|
| 145 |
<P> |
| 146 |
<TABLE WIDTH="100%"> |
| 147 |
<TR> |
| 148 |
<TD ALIGN="left" VALIGN="bottom"><A HREF="hints_headings.html"><IMG SRC="binary/fw_left.gif" HEIGHT="32" WIDTH="32" BORDER="0" ALT="Prev"></A></TD> |
| 149 |
<TD ALIGN="center" VALIGN="bottom"><A HREF="hints.html"><IMG SRC="binary/fw_up.gif" HEIGHT="32" WIDTH="32" BORDER="0" ALT="Up"></A></TD> |
| 150 |
<TD ALIGN="right" VALIGN="bottom"><A HREF="hints_interactive.html"><IMG SRC="binary/fw_right.gif" HEIGHT="32" WIDTH="32" BORDER="0" ALT="Next"></A></TD> |
| 151 |
</TR> |
| 152 |
</TABLE> |
| 153 |
|
| 154 |
|
| 155 |
|
| 156 |
<HR> |
| 157 |
<FONT SIZE="2"> |
| 158 |
<A HREF="mailto:[email protected]">Webmaster</A> |
| 159 |
<A HREF="copyright.html">Copyright © Ross N. Williams 1992,1999. All rights reserved.</A><BR> |
| 160 |
</FONT> |
| 161 |
|
| 162 |
</FONT> |
| 163 |
</TD> |
| 164 |
</TR> |
| 165 |
</TABLE> |
| 166 |
|
| 167 |
|
| 168 |
</BODY> |
| 169 |
|
| 170 |
|
| 171 |
|
| 172 |
|
| 173 |
|
| 174 |
</HTML> |