Commit Graph

4 Commits

Author SHA1 Message Date
Anders Kaseorg e63365a4da katex_server: Fix import/no-named-as-default.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-09-25 15:41:01 -07:00
Anders Kaseorg 3c06c899c5 katex_server: Fix implicit use of any.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-04 18:53:34 -07:00
Alex Vandiver bfe4017663 katex_server: Add Prometheus metrics. 2024-03-15 15:34:12 -07:00
Alex Vandiver c13e3dee24 katex: Replace subprocess call with minimal external service.
Replace a separate call to subprocess, starting `node` from scratch,
with an optional standalone node Express service which performs the
rendering.  In benchmarking, this reduces the overhead of a KaTeX call
from 120ms to 2.8ms.  This is notable because enough calls to KaTeX in
a single message would previously time out the whole message
rendering.

The service is optional because he majority of deployments do not use
enough LaTeX to merit the additional memory usage (60Mb).

Fixes: #17425.
2024-03-15 15:34:12 -07:00