runem / lit-analyzer

Monorepository for tools that analyze lit-html templates
MIT License
319 stars 38 forks source link

perf: pass a cache when converting types #102

Closed 43081j closed 4 years ago

43081j commented 4 years ago

Ignoring the typescript compilation, i got these times:

1.2.0 - 8 seconds perf-type-cache - 6 seconds

Just by having this weak map in place. Is this fine?

cc @runem

runem commented 4 years ago

branch 1.2.0 now depends on v1.0.0 of ts-simple-type which comes with lazy types and fixed caching. It's possible to cache types properly now because of the removal of the CIRCULAR_REF type. All types are cached as default and there is no need for providing our own cache when interacting with ts-simple-type, - however thanks for opening this PR :-)