Open pavel-trafimuk opened 10 months ago
cc @djbe
Hello, can somebody review this PR? This change seems to be very useful for our project at Hylo, where we generate thousands of pages for the documentation of the standard library using Stencil.
To my understanding, this would be a breaking change, as the caches require the generator functions to be mutating. In swift there might be a way to opt out of the strict value semantics and make the cache a mutable field that is not part of the object's value, something like the mutable
keyword for struct members in C++ that allows the field to be mutated from a const function, thus allowing the introduction of caches with const API.
Currently, Stencil load and parse template file for each new output file generation, this improve help to reduce repetitive logic and significantly improve performance (on 30-50%)