[Date Index][Thread Index]
[Date Prev][Date Next][Thread Prev][Thread Next]
Re: Slow motion in mhc
- From: Denis Barbier <nospam@thanx>
- Date: Wed, 23 Jun 1999 17:12:16 +0200 (CET)
On Mon, 14 Jun 1999, Jan Ulrich Hasecke wrote:
> Hello!
>
> main | ipp mhc epl gm4 div asub hfix hstr slic | TOTAL
> ---- | ---- ----- ----- ---- ---- ---- ---- ---- ---- | ------
> 2.35 | 1.89 16.65 2.95 0.33 0.94 0.33 1.04 1.23 1.76 | 29.47
> *****
> Is this a hint, that I made something wrong? Pentium100 with
> Linux.
We will see when you post your file. Meanwhile, i ask for volunteers to
help me speeding up this second pass. Below is a test sample to compare
passes 2 and 4. Time results are
** WML:Verbose: Processing time (seconds):
** WML:Verbose: main | ipp mhc epl gm4 div asub hfix hstr slic | TOTAL
** WML:Verbose: ---- | ---- ----- ----- ---- ---- ---- ---- ---- ---- | ------
** WML:Verbose: 0.87 | 0.22 8.05 0.10 1.72 -- -- -- -- -- | 10.96
I believe one of the problem is that Meta-HTML spends a lot of time
allocating and deallocating packages (in the Meta-HTML sense) we do not
use. Suppressing references to those packages is not an easy task.
########## test.24 #########
# Number of iterations
<set-var limit=4000>
# wml-1.6.8 needs the following line, otherwise loops are limited
# to 500 iterations
<set-var mhtml::iteration-limit=<get-var limit>>
<define-tag deftest whitespace=delete>
<%%eval <subst-in-string
"<XdefineX-tag test%0><test<add 1 %0>></XdefineX-tag>" "XdefineX"
"define">>
</define-tag>
# <test1> expands to <test2> which in turn expands to <test3>...
<set-var i=0>
<while <lt i <get-var limit>>><increment i><deftest <get-var i>></while>
# Display
<test1>
# Pass 4
# forloop is defined in the m4 manual
m4_quotes
m4_define(`forloop',
`m4_pushdef(`$1', `$2')_forloop(`$1', `$2', `$3', `$4')m4_popdef(`$1')')
m4_define(`_forloop',
`$4`'m4_ifelse($1, `$3', ,
`m4_define(`$1', m4_incr($1))_forloop(`$1', `$2', `$3', `$4')')')
m4_define(`deftest', `m4_define(`test$1', test`'m4_incr($1))')
forloop(`i', 1, <get-var limit>, `deftest(i)')
test1
## EOF ##
--
Denis Barbier
WML Maintainer
______________________________________________________________________
Website META Language (WML) www.engelschall.com/sw/wml/
Official Support Mailing List sw-wml@engelschall.com
Automated List Manager majordomo@engelschall.com