[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date
][Minivend by thread
]
Re: [mv] Result page...
Quoting Eran Binyamin Zeitoun (eran_zeitoun@karmail.com):
>
> Hi To everyone,
>
> I am displaying in my result page a diffrent table to each diffrent
> category, While the way i am doing it slowing very much the result page
> creation, Today i am using the following:
>
> [search-list]
> [sort][value mfg][/sort]
> [on-change 1]
> [condition][item-field category][/condition]
> [perl arg=scratch]
> $Safe{'scratch'}->{'dummy'} = '[item-field category]';
> return '';
> [/perl]
> [if scratch dummy eq 'hds'] *** Display Diffrent Table Header **** [/if]
> [if scratch dummy eq 'flagx'] *** Display Diffrent Table Header **** [/if]
> [if scratch dummy eq 'cds'] *** Display Diffrent Table Header **** [/if]
> [if scratch dummy eq 'monitors'] *** Display Diffrent Table Header ****
> [/if]
> [if scratch dummy eq 'tapes'] *** Display Diffrent Table Header **** [/if]
>
> [/on-change 1]
> [if scratch dummy eq 'hds'] *** Dipslay Diffrent Table Content ****[/if]
> [if scratch dummy eq 'flagx'] *** Dipslay Diffrent Table Content ****[/if]
> [if scratch dummy eq 'cds'] *** Dipslay Diffrent Table Content ****[/if]
> [if scratch dummy eq 'monitors'] *** Dipslay Diffrent Table Content
> ****[/if]
> [if scratch dummy eq 'tapes'] *** Dipslay Diffrent Table Content ****[/if]
> [/comment]
> [/search-list]</TABLE>
Keywords: slow performance speed
The people who are complaining about MiniVend speed must be using
something like this. 8-) 11 perl calls and MiniVend tag parses
per item, no wonder it is slow.
Think about this, people. Use the power of Perl and MiniVend's usertags.
I never claimed MiniVend's tag stuff was a language. But you can get the
benefits of one by doing something like this.
UserTag cat-select Order category
UserTag cat-select HasEndTag
UserTag cat-select Routine <<EOF
sub {
my ($cat, $text) = @_;
$text =~ m{\[$cat\](.*)\[/$cat\]}s
and return $1;
$text =~ s{\[(\w+)\].*\[/\1\].*}{}s;
return $text;
}
EOF
Now:
[cat-select [item-field category]]
[hds]
Table for hds
[/hds]
[cds]
Table for cds
[/cds]
Default if not found
[/cat-select]
This should speed things up dramatically. Like by an order of
magnitude or more.
--
Mike Heins http://www.minivend.com/ ___
Internet Robotics |_ _|____
Any man who is under 30, and is 131 Willow Lane, Floor 2 | || _ \
not liberal, has not heart; and Oxford, OH 45056 | || |_) |
any man who is over 30, and is not <mikeh@minivend.com> |___| _ <
a conservative, has not brains. 513.523.7621 FAX 7501 |_| \_\
-- Winston Churchill
- References:
- Result page...
- From: "Eran Binyamin Zeitoun" <eran_zeitoun@karmail.com>