[chora] luxor / chora

Anil Madhavapeddy anil@recoil.org
Fri, 10 Aug 2001 16:53:30 +0100


On Thu, Aug 09, 2001 at 08:40:30AM +0200, Cynic wrote:
> 
> First, let me say that the fact that code in Chora that actually 
> does something (i. e. besides declarations) is spread among files 
> directly requested from browser and files included from these 
> makes it really hard to understand the code. Looks like the only 
> one who's been working on Chora so far is Anil, so this is 
> understandable (no need to read other people's code, no problems),
> but I'd be extremely happy if it'd be possible to reorganize the 
> flow so that the includes contain only class declarations etc. 
> Opinions?

I must confess I have no idea what you are saying here ...
what do you want to do exactly?

CVSLib sort of evolved as I got to know CVS, and I've been
pondering about how to generalise it to support Subversion and
Perforce as well.

Reorganisation with this in mind would be a good thing;
anything else to fix up what is currently there is probably
not worth it if it's a fundamental reorganisation.

> Second, Chora is terribly heavy. For example, a CVSLib_File object
> for a file with two revisions and a single branch (HEAD) contains
> seven full CVSLib objects. print_r() representaion of that object
> has 45kB, and it doesn't include the method hashes. I know this 
> doesn't say much, but you get the idea. Are such heavy objects 
> really necessary? I believe this slows down execution significantly.

This can probably be fixed pretty trivially by changing the CVS
object to a global variable, or just request a singleton. I'll
look at this.

Of greater concern are the repeated forks; we really need
to cache stuff.  I was looking at the PEAR stuff for this on 
the plane around 4 hours ago; I'll try that today as well.

> </soapbox>

No need for rants :)

> 1) What variable or public object property contains / accessor returns
> the filepath as contained in the URLs? To make myself clear:
> given this URL, I want to get the "/luxor/images/back.gif" part:
> http://localhost/horde/chora/co.php/luxor/images/back.gif?r=1.1.1.1

URL handling is also really messy right now; I'm actually
working on this today, so you'll have a different answer after
I commit shortly.

I want to hook in this URL creation as a registered method
in the registry, so external apps can also link into Chora.

Anil