Markdown rendering gets slower on every request
Markdown sanitization code is adding new transformers and elements to a global list every time Markdown is rendered. This causes things to accumulate and requests to slow down very quickly until the Ruby process is restarted (multiple seconds per request after a few hundred requests on my setup).
In the newest stable version the relevant code is here:
In master the equivalent code is here:
.dup might be in order for both the global object and the lists that are being modified. Or perhaps the whitelist could be set up just once and not modified every time.