Hello All,

Thanks to everyone for the help and advice. I have determined that it is the server and not CGI::Template that is being slow. Now I just need to figure out why that is happening, but that is a new topic in itself.

Regards,
Howard Kim

On Monday, January 20, 2003, at 11:28 AM, Cory Trese wrote:

I agree.

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of
simran
Sent: Sunday, January 19, 2003 6:47 PM
To: Howard Kim
Cc: [EMAIL PROTECTED]
Subject: Re: [htmltmpl] Slow CGI when linking to a CSS or JS


It doesn't sound like a Template issue... i'd say the issue is almost
definitely with the javascript.... the script is probably loading an
image or the likes from another server which is slower giving the
impression of the page being loaded slower...
This sounds like a problem that is not related to HTML::Template. The part
that is really being slow is the web-browser, or the web-server. If you can
prove that the template script (at command line) runs slower with the
external reference, then I would be corrected (not to mention very
surprised).

On Sat, 2003-01-18 at 09:56, Howard Kim wrote:
Hello All,

I just started playing with HTML::Template and ran across something
odd. I hope someone on the list has encountered something similar.

I wrote a simple HTML template to test the module:

##test.tmpl##
<html>
<head>
<title>test template</title>
<script src="../../general/scripts/scripts.js"
type="text/javascript"></script>
<link rel="stylesheet" href="../../general/scripts/style.css"
type="text/css">
</head>
<body>
<div class="howto-attention">HTML::Template = <TMPL_VAR
NAME="description"></div>
</body>
</html>

And an accompanying CGI program:

##test.cgi##
#!/usr/local/bin/perl

use CGI qw(:standard);
use HTML::Template;
use strict;
my $doc = "test.tmpl";

print header;

# HTML::Template
my $T = HTML::Template->new(filename => "$doc");
$T->param(description => "Testing template speed");
print $T->output;

Here is the problem. This CGI takes a really long time (about 3.5
seconds) to load. My client is: Mozilla 1.2.1 on 1.8GHz Pentium 4 on
Mandrake Linux 8.2. The server is a Sun Solaris server running Apache
1.3.27 with HTML::Template 2.6.

How large are the external files?


The odd thing is that if I remove the
references to the external Javascript or Cascading Style Sheet
file from
the HTML template, the CGI runs fast; with the external files, really
slow.  Is there anything I'm doing wrong, or has anyone else
experienced
this?
I assume you mean it takes a lot less time to render in the browser? Or am
I confused, and you are running your tests at command line (or in
CGI::Test?)


More info perhaps?


Thanks,

Cory Trese
Lead Web Application Developer

O'NEIL & ASSOCIATES, INC.
495 Byers Rd.
Miamisburg, Ohio 45342-3662
Phone: (937) 865-0800 ext. 3038
Fax: (937) 865-5858
E-mail: [EMAIL PROTECTED]



-------------------------------------------------------
This SF.NET email is sponsored by: FREE SSL Guide from Thawte
are you planning your Web Server Security? Click here to get a FREE
Thawte SSL guide and find the answers to all your SSL security issues.
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0026en
_______________________________________________
Html-template-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/html-template-users


-------------------------------------------------------
This SF.net email is sponsored by: Scholarships for Techies!
Can't afford IT training? All 2003 ictp students receive scholarships.
Get hands-on training in Microsoft, Cisco, Sun, Linux/UNIX, and more.
www.ictp.com/training/sourceforge.asp
_______________________________________________
Html-template-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/html-template-users

Reply via email to