]> Sergey Matveev's repositories - public-inbox.git/commit
viewdiff: save memory by eliminating two captures
authorEric Wong <e@80x24.org>
Mon, 26 Sep 2022 10:17:12 +0000 (10:17 +0000)
committerEric Wong <e@80x24.org>
Mon, 26 Sep 2022 19:22:02 +0000 (19:22 +0000)
commit06600f6ea9258425f4f7ff7a7b1f3d028d11b638
tree6a7dcad9b34890b5df1ec5eaff9b064f47549fe1
parentfbe89926961e2e090481fa283048c31aaddc17cf
viewdiff: save memory by eliminating two captures

Avoid relying on $DIGIT captures when @- and @+ to access
last match start and end, respectively.  The elimination of
the post capture ought to allow the use of sv_chop to advance
the string start pointer without memory copies.

This ought to save 1-2MB of memory on my system since I've
noticed the captures was using a big chunk of scratchpad
space.
lib/PublicInbox/ViewDiff.pm