From: andy at warmcat.com (Andy Green)
Subject: [PATCH] native inline gravatar
Date: Wed, 4 Jul 2018 08:28:38 +0800 [thread overview]
Message-ID: <ade60abc-ef3b-8b17-890f-14e6492af652@warmcat.com> (raw)
In-Reply-To: <CAHmME9rqtgUCDNumKTmXjyKNg-6SSs-DhmVFTnuZUscsbDfoRw@mail.gmail.com>
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
time.
>> 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
>> x86_64.
>
> 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.
-Andy
next prev parent reply other threads:[~2018-07-04 0:28 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-01 3:20 andy
2018-07-03 23:49 ` Jason
2018-07-04 0:00 ` andy
2018-07-04 0:14 ` Jason
2018-07-04 0:28 ` andy [this message]
2018-07-04 0:34 ` Jason
2018-07-04 0:44 ` andy
2018-07-04 1:05 ` Jason
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ade60abc-ef3b-8b17-890f-14e6492af652@warmcat.com \
--to=cgit@lists.zx2c4.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).