[darcs-devel] GHC's darcs evaluation wiki page

Alberto Bertogli albertito at gmail.com
Tue Mar 11 17:12:13 UTC 2008


On Sun, Mar 09, 2008 at 09:24:50PM -0600, zooko wrote:                                             
> "We can't use Trac's darcs integration or darcsweb, for example,                                 
> because both rely on invoking darcs changes <file>."                                             
>                                                                                                  
> This is wrong, because trac-darcs caches the results of the calls to                             
> "darcs changes" and "darcs annotate", so only the first one (or                                  
> perhaps only the first one since the file was last changed?) incurs                              
> the full time penalty.                                                                           
                                                                                                   
darcsweb can also cache all the generated pages, so unless the                                     
repository change, only first views of anything trigger darcs                                      
invocations. It is more expensive than the approach you describe (cache                            
darcs' output instead of darcsweb's) but was simpler to implement, and I                           
doubt the difference is so big. I gladly take patches to cache darcs'                              
output, it shouldn't be a difficult task.                                                          
                                                                                                   
                                                                                                   
Sometime ago I thought about implementing a "smart cache" daemon, that                             
monitored the repo, called a minimal number of darcs commands when                                 
something changed, and offered a simple query interface for third party                            
commands like darcsweb.                                                                            
                                                                                                   
That way, the daemon would perform a "darcs changes" once, and then you                            
can query for changes affecting only a file and it would not result in a                           
darcs invocation.                                                                                  
                                                                                                   
There are several tricks like that which could improve darcsweb's (and                             
similar tools) performance a lot.                                                                  
                                                                                                   
I never got to do it, mainly because I did not have the need, and nobody                           
asked me to. As I've moved to git, I'm unlikely to work on this; but I'd                           
gladly help anyone who wants to give it a shot.                                                    
                                                                                                   
                                                                                                   
Thanks,                                                                                            
		Alberto




More information about the darcs-devel mailing list