]> git.refcnt.org Git - colorize.git/commitdiff
Optimize merging for partial lines further
authorSteven Schubiger <stsc@refcnt.org>
Fri, 15 Jan 2016 14:40:32 +0000 (15:40 +0100)
committerSteven Schubiger <stsc@refcnt.org>
Fri, 15 Jan 2016 14:40:32 +0000 (15:40 +0100)
Completing partial lines (i.e., to ones without truncated escape sequences)
can be handled more efficiently by concatenating only the partial line
beginning at the last escape control character with the characters read
from the input stream.  Compared to previous code which concatenated the
*entire* partial line with the characters read, pass now the resulting
string of aforementioned concatenation separately to the escape sequence
cleaning function.

Even though it may appear as a minor optimisation, it is a /substantial/
improvement in terms of memory being allocated when cleaning lines.


No differences found