Well we have three different include methods (4 if you count tiles:insert)
and I'm just trying to fully understand the implications of using each.

<%@ include file="" %> is like a C include, so it leads to larger JSP files,
but it offers a speed advantage over passing along the request, which is
what <jsp:include> does.

I was thinking that a naive implementation of <c:import> might just
construct the URL and go fetch from the Internet every time, even if the URL
was on the local machine.  This would mean getting the content through the
local web server rather than the local file system.  This is a toy example,
but I'm thinking that since <jsp:include> has been around longer that it
might have been tuned better than <c:import> and thus could be depended on
to be faster than <c:import> for nearly all containers.  Does that make
sense?

Also, since you can store <c:import> in a variable I'm wondering if
<c:import> might do some type of full read before printing to output,
whereas I imagine <jsp:include> uses buffering.  This could show a
performance difference for very large files, with <c:import> requiring
longer and taking more memory to get all the data in the import whereas
<jsp:include> did things with buffers.  Am I thinking about this too much?
I really don't know how all this stuff is implemented ;)

Matt
----- Original Message ----- 
From: "Chen, Gin" <[EMAIL PROTECTED]>
To: "'Tag Libraries Users List'" <[EMAIL PROTECTED]>
Sent: Wednesday, September 24, 2003 10:42 AM
Subject: RE: Speed differences between <jsp:include> and <c:import>


> Just out of curiousity. Unless the code is doing something short of
> ridiculous.. How much of a speed difference could there really be? I mean
> what exactly are u looking for? Would a difference of 100 milli effect the
> outcome of ur app? 1 sec even? What is the you main concern?
> -Tim
>
> -----Original Message-----
> From: Serge Knystautas [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, September 24, 2003 9:35 AM
> To: Tag Libraries Users List
> Subject: Re: Speed differences between <jsp:include> and <c:import>
>
>
> Sgarlata Matt wrote:
> > Does anyone know if there are any speed differences between using
> > <jsp:include> and <c:import> if one is including a file that is local to
> the
> > web server?  Obviously if one does <c:import> and imports a file from a
> > remote web server that will be slower than including something on the
> local
> > server.
> >
> > Sorry if this is a common question, but I searched google, here and
> > struts-user and could not find an answer.
>
> Since c:import does what a jsp:include does if it a local resource, the
> difference should be minimal.  It is open source though, so I'd check
> out the code and see what is any extra processing is done.
>
> -- 
> Serge Knystautas
> President
> Lokitech >> software . strategy . design >> http://www.lokitech.com
> p. 301.656.5501
> e. [EMAIL PROTECTED]
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to