Caching loaded template lines to improve performance#345
Caching loaded template lines to improve performance#345pavel-trafimuk wants to merge 2 commits intostencilproject:masterfrom
Conversation
Caching already loaded templates
|
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 |
|
@tothambrus11 seems like repo is not maintenaning anymore. this improved already implemented in https://github.com/art-divin/StencilSwiftKit.git and https://github.com/art-divin/StencilSwiftKit.git and finally in Sourcery and it was checked by time. |
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%)