]> Sergey Matveev's repositories - public-inbox.git/commit
viewvcs: use array for highlighted blob display
authorEric Wong <e@80x24.org>
Mon, 29 Aug 2022 09:26:34 +0000 (09:26 +0000)
committerEric Wong <e@80x24.org>
Mon, 29 Aug 2022 19:05:45 +0000 (19:05 +0000)
commit2231b44cd5726ce338ca6213300b4e8c74f1bcaa
tree6ab264975eb12af4323127ae83e944204db8d4b6
parent95a3cace67ff5297e6fc35972e401b7cb17ee310
viewvcs: use array for highlighted blob display

This can avoid at least one expensive copy for displaying
large blobs with syntax highlighting.

However, we cannot blindly change everything to arrays, either:
the cost of invoking Compress::Raw::Zlib->deflate must be taken
into account.  Joining short strings via `.=', `.', `join' or
interpolation is typically faster since it avoids ->deflate
method calls (and non-magic perlops are the fastest dispatches
in Perl).
lib/PublicInbox/ViewVCS.pm