Login | Register
My pages Projects Community openCollabNet

Discussions > dev > Re: [helm-dev] Replace TView with Wrap?

Project highlights: Architectural Overview

joist
Discussion topic

Back to topic list

Re: [helm-dev] Replace TView with Wrap?

Author edk
Full name Ed Korthof
Date 2000-07-01 17:59:50 PDT
Message On Fri, 30 Jun 2000, Manoj Kasichainula wrote:

> On Fri, Jun 30, 2000 at 04:28:01PM -0700, Ed Korthof wrote:
> > Are you saying that with a reguest for a piece of dynamic content (ie. the
> > output from a servlet), an additional http request will be required?
>
> I didn't think TView was needed for our dynamic content.
[snip]

Ah -- sorry, I was confused by the discussion of doing branding though
only one mechanism. This makes much more sense to me ...

OK, after some tests, I'm +1 on the change. More discussion follows; feel
free to ignore it, though.

> > I don't think you can discount the disadvantage so lightly: if we reach a
> > point where we're serving a significant amount of traffic, this nearly
> > doubles the cost of delivering static content (in terms of the processing
> > required).
>
> Do we have any stats on servlet processing delay vs. HTTP processing
> delay? My assumption was that servlet delay >> loopback HTTP delay, so
> that (servlet + HTTP) is approximately = (servlet + HTTP + loopback
> HTTP).

Well, I've seen stats on how much additional time it takes to use a URL
connection to get static content. Someone on the JServ list did a bit of
testing based the discussion there, using URL.openStream() ... I think
his result was at most an addition of 50ms to request time, and that may
have required several such requests. (Also, it was older hardware.)

... So I went ahead and did some tests. As a base point of reference, a
simple document takes about 250ms to deliver through TView on my test
system.

I tried a couple of different approaches to the tests. First, when using
a small file (144bytes), I found that using a FileReader is slightly
slower than using an URL. I switched to using a FileInputStream, and that
was faster than URL -- so I'm assuming the issue there is either extra OO
layers or character conversions (probably the later).

When using a 144 byte file, the difference between a FileInputStream and
URL.openStream() was about 60% -- but on a per-request basis, that was
about 6ms. When using a 1512 byte file, the difference increased slightly
-- but the abs size is still small.

That effect is drowned by the cost of using TView. So long as we only
have to do one of these per request (ie. the sidebars & so on are done
locally), you're right -- the effect is insignificant.

> > I can see the advantages, and I know I sometimes go overboard on
> > efficiency issues
>
> I don't think that's possible.

Yeah, it is -- we could say we're going to write this all in C. ;-)
Similarly, there are contortions in code which may be slightly more
efficient, but not worth the time to build & maintain ...

take care --

Ed
--
   +=-=+=-=+=-=+=-=+=-=​+=-=+=-=+=-=+=-=+=-=​+=-=+=-=+=-=+=-=
   | Ed Korthof | edk at collab dot net | 415-247-1690 |
   +=-=+=-=+=-=+=-=+=-=​+=-=+=-=+=-=+=-=+=-=​+=-=+=-=+=-=+=-=

« Previous message in topic | 5 of 6 | Next message in topic »

Messages

Show all messages in topic

Replace TView with Wrap? Manoj Kasichainula <manoj at collab dot net> Manoj Kasichainula <manoj at collab dot net> 2000-06-30 15:19:29 PDT
     Re: [joist-dev] Replace TView with Wrap? Jon Stevens <jon at latchkey dot com> Jon Stevens <jon at latchkey dot com> 2000-06-30 15:38:51 PDT
     Re: [helm-dev] Replace TView with Wrap? edk Ed Korthof 2000-06-30 16:28:01 PDT
         Re: [helm-dev] Replace TView with Wrap? Manoj Kasichainula <manoj at collab dot net> Manoj Kasichainula <manoj at collab dot net> 2000-06-30 17:29:44 PDT
             Re: [helm-dev] Replace TView with Wrap? edk Ed Korthof 2000-07-01 17:59:50 PDT
     Re: [joist-dev] Replace TView with Wrap? "Daniel L dot Rall" <dlr at collab dot net> "Daniel L dot Rall" <dlr at collab dot net> 2000-06-30 16:46:01 PDT
Messages per page: