Skip to content

Commit

Permalink
reduce memory use of pbchunk conversion (#820)
Browse files Browse the repository at this point in the history
C code generated by the pbchunk conversion is especially verbose, with
long macro names for simple operations and lots of comments to reflect
source instructions. Generation of that code was formerly rendering to
text in memory, and then splitting into the output files, which turns
out to use a lot of memory. Converting to text at the last minute can
have a much lower peak memory use.

If memory is at a premimum, then rendering to a temporary file would
work even better, but this change already brings memory use in line
with other build actions without having to deal with a temporary file.
Memory use could also be reduced by dropping comments that connect to
source instructions; again, though, doesn't seem necessary for now.
  • Loading branch information
mflatt committed Mar 26, 2024
1 parent 3555ad0 commit dbce392
Showing 1 changed file with 266 additions and 239 deletions.

0 comments on commit dbce392

Please sign in to comment.