]> git.ipfire.org Git - thirdparty/public-inbox.git/commit
www_coderepo: use OnDestroy to render summary view
authorEric Wong <e@80x24.org>
Sun, 9 Apr 2023 22:30:13 +0000 (22:30 +0000)
committerEric Wong <e@80x24.org>
Mon, 10 Apr 2023 06:48:39 +0000 (06:48 +0000)
commitcbe2548c91859dfb923548ea85d8531b90d53dc3
tree00d1b0c02d35dbbcf4208fc5a911dd68f9973861
parente237814c6bf2d01ecadff147f2b37f1a8185b0e1
www_coderepo: use OnDestroy to render summary view

This lets us get rid of a /bin/sh process and allows us us to
rely on Qspawn to parallelize git commands.

Special treatment of the OnDestroy object is necessary to keep
its scope limited for MockHTTP.  Neither the generic `plackup'
HTTP server and nor our -httpd/-netd needed this scope
limitation.  As a result, summary() is now called inside an
anonymous sub to keep the memory overhead of the anonymous sub
itself as small as possible.  Avoiding anonymous subs entirely
would be preferable for memory savings, but it's necessary for
PSGI.
lib/PublicInbox/WwwCoderepo.pm