Re: [RFC] gitweb wishlist and TODO list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Martin Langhoff wrote:

> And, as you mention in your other post, mod_perl support. And a bit of
> speed. Gitweb rght now is really really slow.

A few days ago I have tried to run gitweb under mod_perl and these
are my results.  All of this hasn't got any real testing, so this is
more a request for comment.  I had to make two changes to gitweb to
get it running as a Registry script with mod_perl:

(1) With mod_perl you cannot access variables which were defined
    with "my" on file scope from subroutines.  Unless gitweb becomes
    split in separate packages the easiest solution is probably to
    use "our" to declare them.

(2) Setting %ENV has no effect on spawned processes under mod_perl,
    so the git commands would never find the project directories.
    My first thought was to set $GIT_DIR on the commands' command
    lines like in open($fh, '$GIT_DIR=blah git-rev-list ...') but it
    would lead to an extra shell being spawned on every invocation
    of a git command.

    So I added the possibility to set/override the path to the
    repository with a command line parameter.  For simplicity I
    handled that parameter in git.c.  The drawbacks are that it has
    to be given before the command name and that it won't work when
    commands are invoked as "git-command".

The gains vary hugely.  Inexpensive views like the title page, blob
and commit view are sped up by a factor of 5 to 8 for successive
requests.  The project summary in contrast issues quite a number of
calls to git, so the speedup is only a few percent for it.

Regards,
Dennis
-
: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]