On Fri, 21 Sep 2001, Quentin Smith wrote:
> Why not use the fastest code of all?
> print "";
> open(FANFIC, "$file") or print "File not found:$!\n";
> print $_ while ();
> close(FANFIC);
is an obsolete tag---it's actually illegal in HTML 4.0. Some web
browsers (including Opera 5.12, which I use
On Thu, 20 Sep 2001, Philip Mak wrote:
> I have a page on my website that prints a plain text file in HTML. So, it
> does something like this:
>
> print "";
> open(FANFIC, "$file") or print "File not found: $!\n";
> print Apache::Util::escape_html($_) while ();
> close(FANFIC);
> print
On Thu, 20 Sep 2001, Joshua Chamas wrote:
> If you would humor me, I wonder what the speed would be if
> you used $Server->HTMLEncode() with that optimization?
> I would be really surprised if it was < 40 req/sec.
Well, this is interesting. I just benchmarked it, and
$Server->HTMLEncode() is 44
Philip Mak wrote:
>
> Thanks for the tip about escaping it all at once, instead of line by line.
> I ended up doing this on my website, since it'll always be hosted on
> Apache/Linux (I think):
>
> local $/ = undef;
> print escape_html(); # from Apache::Util
>
> That script is now up to 45 requ
Thanks for the tip about escaping it all at once, instead of line by line.
I ended up doing this on my website, since it'll always be hosted on
Apache/Linux (I think):
local $/ = undef;
print escape_html(); # from Apache::Util
That script is now up to 45 requests per second (it was originally 30
Philip Mak wrote:
>
> I have a page on my website that prints a plain text file in HTML. So, it
> does something like this:
>
> print "";
> open(FANFIC, "$file") or print "File not found: $!\n";
> print Apache::Util::escape_html($_) while ();
> close(FANFIC);
> print "\n";
>
> I used
I have a page on my website that prints a plain text file in HTML. So, it
does something like this:
print "";
open(FANFIC, "$file") or print "File not found: $!\n";
print Apache::Util::escape_html($_) while ();
close(FANFIC);
print "\n";
I used to use $Server->HTMLEncode() instead of
A