TagsGenerator

receipt/xml~ TagsGenerator

Generation of XML nodes using string literals.
Similar in declaration to NodesGenerator's methods, but definitions.

This class handles high-performance XML node generation using template literals.
By replacing traditional DOM manipulation (createElement, appendChild) with
native string interpolation, memory allocation overhead is drastically reduced.

  • Performance impact:
  • Direct execution time dropped by nearly 8x (~800ms down to ~105ms).
  • Throughput scaled from ~3,600 to ~28,800 invoices per second.
  • Drastically lower Garbage Collector pressure, making it ideal for high-concurrency environments.