To factor the error checking, use importChecked instead of importSeq. This
avoids repeating the names of all of the imported child nodes once, and allows
errors to be checked with a single conditional as it is with importSeq.
After:
peak memory: 601.63MB real: 0m19.172s obj size: 8,352kb
Before:
peak memory: 954.11MB real: 0m26.188s obj size: 10,000kb
The speed is not as impressive as I hoped, but the memory use reduction
is impressive, and seems worth it.
I should add that I'm a novice with variadic templates. If anyone else has suggestions for a better way to iteratively call importInPlace on each argument, left to right, I'm open to it. I found this initializer list trick on stack overflow.