You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently mustachio has a very rudimentary deduplication strategy that leaves a
fair number of unused partial render functions dangling in the generated code.
This is because we delete a partial renderer function without taking great care
about what partial functions it might have rendered, and which maybe are no
longer rendered. This occurs particularly with deduplicated renderer functions
that then don't become used any more.
This change introduces a renderer cache and a more formal 'reference-counting'
strategy to know if a renderer becomes unused. Tracking all renderer functions
(and the compilers that compiled them, and the used context stacks determined
by compilers) in one place makes it possible to have a more accurate
understanding of what renderer functions become unused through the
deduplication process.
The new strategy is documented pretty well in this change, in the README.
0 commit comments