All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jakub Narebski <jnareb@gmail.com>
To: "J.H." <warthog9@eaglescrag.net>
Cc: git@vger.kernel.org, "John 'Warthog9' Hawley" <warthog9@kernel.org>
Subject: Re: [PATCHv3 3/4 (resent)] gitweb: Optionally add "git" links in project list page
Date: Tue, 12 Jan 2010 14:05:22 +0100	[thread overview]
Message-ID: <201001121405.24365.jnareb@gmail.com> (raw)
In-Reply-To: <4B4BC4CB.2030409@eaglescrag.net>

On Tue, 12 Jan 2010, J.H. wrote:
> On 01/09/2010 03:20 AM, Jakub Narebski wrote:
>> On Sat, 9 Jan 2010, J.H. wrote:

>>> I have given some initial thought to converting the $output options I'm
>>> currently using to a print <FH> that Jakub is suggesting & exploring.
>> 
>> It's 'print {$fh}', i.e. use indirect filehandle, not global filehandle.
>> 
>>> I think all told it's going to be a similarly sized patch, since all
>>> output still has to get adjusted (including the things that directly
>>> output but don't print).  
>> 
>> print -> print {$fh} can be separate patch, and it can be checked that
>> it produces the same results.  Well print -> $output .= could also be
>> separate patch...
>> 
>>> I'm unsure if there's a real advantage to 
>>> either way, other than design preference. My patch (forcing the output
>>> to get passed around) moves towards more of a modal style design
>>> separating data & layout vs. it's combined nature now, well it's a step
>>> in that direction anyway.
>> 
>> Errr... what?  Forcing buffering (you need to read whole output into
>> memory, including for snapshots (uncompressed in case of .tar.gz))
>> is IMVHO orthogonal to the issue of separating data & layout.
>> BTW. Modern web server interfaces like Rack, PSGI/Plack etc. explicitly
>> include streaming support.
> 
> The inbuilt streaming support does change things, and I don't think it
> ultimately changes my caching engine really anyway - I should have that
> change done shortly.

It doesn't change caching engine much, especially if you encapsulate this
detail in the caching engine.  With 'print {$fh}' (and in a few places
'printf {$fh}' (!)) you can just do something like:

  $fh = $cache_fh;
  $actions{$action}->();
  show_cached($fh);


About 'should have that change done shortly': I am working now, time 
permitting, on splitting your caching patch in smaller parts, wrapping
it a bit differently (and hopefully more clear).

>> The advantage of doing 'print {$fh}' is that $fh can be \*STDOUT, can
>> be \$buffer, but can be filehandle to (temporary) file on disk, and
>> you can even "tee" it, i.e. both write to memory/file, and to STDOUT.
>> The number of possible choices / possible improvements is much larger.
>> 
>> And what is also important it means that people who do not use caching
>> do not suffer latency penalty and memory pressure from caching 
>> infrastructure they do not use.

-- 
Jakub Narebski
Poland

  reply	other threads:[~2010-01-12 13:05 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-03 16:07 [PATCHv3 0/4 (resent)] Miscelanous gitweb improvements from J.H Jakub Narebski
2010-01-03 16:07 ` [PATCHv2 1/4 (resent)] gitweb: Load checking Jakub Narebski
2010-01-03 16:07 ` [RFC/PATCHv2 2/4 (resent)] gitweb: Add option to force version match Jakub Narebski
2010-01-03 16:07 ` [PATCHv3 3/4 (resent)] gitweb: Optionally add "git" links in project list page Jakub Narebski
     [not found]   ` <4B47E06C.9070503@eaglescrag.net>
2010-01-09 11:20     ` Jakub Narebski
2010-01-12  0:39       ` J.H.
2010-01-12 13:05         ` Jakub Narebski [this message]
2010-01-03 16:07 ` [PATCHv2/RFC 4/4 (resent)] gitweb: Makefile improvements Jakub Narebski
2010-01-06 22:28 ` [PATCHv3 0/4 (resent)] Miscelanous gitweb improvements from J.H J.H.
2010-01-06 23:22   ` Jakub Narebski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201001121405.24365.jnareb@gmail.com \
    --to=jnareb@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=warthog9@eaglescrag.net \
    --cc=warthog9@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.