Lars,

On 2011-04-07, at 03:30, Lars Hjemli wrote:

> On Tue, Apr 5, 2011 at 13:38, Jonathon Mah <[email protected]> wrote:
> 
>> So I have some patches to cgit to respect both the userdiff xfuncname and
>> textconv.
> 
> Thanks. The changes looks good, but I'm a bit concerned about textconv
> security. Maybe this feature should be disabled by default?

I rethought things a bit a decided to change my approach. Along with trying to 
minimize configuration options, while I was adding the textconv support in the 
first place, I had some serious performance issues. The textconv filter took 
around 2 seconds per file, so diff pages stalled for a while. But much worse, I 
initially tried "enable-log-linecount" on, and the line stats were holding up 
the log page for ~40 seconds. So once my textconv filter was good, I turned on 
"cachetextconv" in the git config.

I've re-written the patch so cgit will use the cached textconv blobs. If a 
cached blob is not available for at least one side of a diff, the diff will 
instead be of the files on disk. This way, cgit will never execute an external 
handler, and so will never be held up by a slow one.

If repo owners want textconv, they can turn on cachetextconv and set a 
post-receive hook to update the cache.

(A not-particularly-efficient, but trivial post-receive hook is:)
while read oldrev newrev ref; do
        git log -u $newrev &>/dev/null
done



Jonathon Mah
[email protected]



_______________________________________________
cgit mailing list
[email protected]
http://hjemli.net/mailman/listinfo/cgit

Reply via email to