[PATCH] native inline gravatar
andy at warmcat.com
Wed Jul 4 02:28:38 CEST 2018
On 07/04/2018 08:14 AM, Jason A. Donenfeld wrote:
> On Wed, Jul 4, 2018 at 2:01 AM Andy Green <andy at warmcat.com> wrote:
>> doesn't use any filters for syntax highlight and markdown render, it's
>> all done in clientside JS. The gravatar is done using this patch.
> If you're into doing things clientside, you could do gravatar
> clientside too of course...
I looked at it, but there's no md5 api in JS... you have to do it by
hand in JS. It's possible but I think it might be slow if it hits a
page of 50 different email addresses.
>> This of course is a big performance win on the server since no
>> subprocesses spawned at all. Even on large files on an Android tablet,
>> it's quick.
> It's worth noting that Lua does not spawn sub processes, so if you do
> rendering from Lua, you're in good shape.
Is it supported to do the job of pygments in Lua?
What it does today is spawn the python runtime, start that up etc.
> However, there are indeed advantages -- such as bandwidth -- to doing
> this all clientside.
I know... bandwidth and server compute time.
Also there's no reason (other than not enough care taken with frees atm)
cgit should only be buildable as a cgi starting up its own process each
>> OpenSSL is accelerated for some things on some architectures, it's true.
>> If that was the actual problem that can be ported as a special case of
> We're not going to start copy and pasting OpenSSL into cgit to
> superoptimize our own MD5 implementation...
It could optionally link against OpenSSL then :-) It can optionally
link against lua.
If you're not interested in going where this stuff is going, you can
save us both a lot of time by just saying it now, and I'll stop trying
to sell it here.
More information about the CGit