git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] gitweb: Begin splitting gitweb
@ 2011-02-01 16:50 Jakub Narebski
  2011-02-01 16:50 ` [PATCH (version A) 1/2] gitweb: Prepare for " Jakub Narebski
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Jakub Narebski @ 2011-02-01 16:50 UTC (permalink / raw)
  To: git
  Cc: John 'Warthog9' Hawley, John 'Warthog9' Hawley,
	Jakub Narebski

Gitweb is currently next to largest file (after gitk) in git sources,
more than 220K with more than 25,000 lines.  Therefore adding any
large feature that would require large amount of code added, like
gitweb caching by J.H. and my rewrite of it, or "gitweb admin/write"
[failed] GSoC 2010 project by Pavan Kumar Sunkara require for new code
to be added as a separate module or module.  Otherwise gitweb would
fast become unmaintainable.

Not in all cases it would require splitting gitweb upfront.  At least
in the case of gitweb caching it doesn't.  What must be done however
is preparing the infrastructure for modular gitweb sources; to
properly test such infrastructure we need at least one split gitweb
module.


This series is intended to bring such infrastructure to gitweb, to
prepare way for adding output caching to gitweb. Alternatively it can
be thought as beginning of splitting gitweb into smaller submodules,
for better maintability.


Table of contents:
~~~~~~~~~~~~~~~~~~
* [PATCH (version A) 1/2] gitweb: Prepare for splitting gitweb

    sub __DIR__ () {
    	File::Spec->rel2abs(join '', (File::Spec->splitpath(__FILE__))[0, 1]);
    }
    use lib __DIR__ . '/lib';

  Advantages:
  - no changes to t/gitweb-lib.sh, ability to run source version
    of gitweb without any changes
  
  Disadvantages:
  - supports only modules installed either alongside gitweb, or in one
    of PERL5LIB directories; no support for installing modules not
    alongside gitweb
  - because we cannot rely on FindBin::again being available nor on
    having Dir::Self installed, __DIR__ must be defined -- more code.
 
* [PATCH (version B) 1/2] gitweb: Prepare for splitting gitweb

    use lib $ENV{'GITWEBLIBDIR'} || "++GITWEBLIBDIR++";

  Advantages:
  - supports relocating gitweb modules (to gitweblibdir)
  - shortest code of all the cases

  Disadvantages:
  - required changes to t/gitweb-lib.sh to pick up gitweb modules
    by source version of gitweb

* [PATCH (version C) 1/2] gitweb: Prepare for splitting gitweb

    sub __DIR__ () {
    	File::Spec->rel2abs(join '', (File::Spec->splitpath(__FILE__))[0, 1]);
    }
    use lib __DIR__ . '/lib';
    use lib "++GITWEBLIBDIR++";

  Advantages:
  - can run source version of gitweb (gitweb/gitweb.perl) as a script simply
  - supports relocating gitweb modules (to gitweblibdir)

  Disadvantages:
  - most complicated code of all cases


* [PATCH (proof of concept) 2/2] gitweb: Create Gitweb::Util module

  Something to actually test previous patch(es) with... and I guess
  good start to splitting gitweb into smaller modules.

  All versions pass "make -C gitweb test" and "make -C gitweb test-installed"
  after "make -C gitweb install" / "make install-gitweb".


Shortlog:
~~~~~~~~~
Jakub Narebski (1):
  gitweb: Prepare for splitting gitweb

Pavan Kumar Sunkara (1):
  gitweb: Create Gitweb::Util module

Diffstat (for version C):
~~~~~~~~~~~~~~~~~~~~~~~~~
 gitweb/Makefile           |   22 +++++-
 gitweb/gitweb.perl        |  150 ++++-----------------------------------
 gitweb/lib/Gitweb/Util.pm |  177 +++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 210 insertions(+), 139 deletions(-)
 create mode 100644 gitweb/lib/Gitweb/Util.pm

-- 
1.7.3

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2011-02-11 23:22 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-01 16:50 [PATCH 0/2] gitweb: Begin splitting gitweb Jakub Narebski
2011-02-01 16:50 ` [PATCH (version A) 1/2] gitweb: Prepare for " Jakub Narebski
2011-02-01 16:50 ` [PATCH (version B) " Jakub Narebski
2011-02-01 16:50 ` [PATCH (version C) " Jakub Narebski
2011-02-02 19:08   ` "Alejandro R. Sedeño"
2011-02-11 23:21     ` Jakub Narebski
2011-02-01 16:50 ` [PATCH (proof of concept) 2/2] gitweb: Create Gitweb::Util module Jakub Narebski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).