Skip to content

Template caching do not work #1378

@nreynis

Description

@nreynis

The cache for helpers.template do not work because it's declared inside the function scope and recreated at every helper call.

Also, only trivial variable-less template get cached (because of the !/\W/ regex).

This cause major slowdowns for charts that gets redrawn frequently (even in modern browsers like Firefox).

This can be fixed by changing a few lines (5, 21 & 37 in below gist)

https://gist.github.com/ywg/14e3c3f9ba052ff40b2d

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions