Open xusd320 opened 6 months ago
tree shaking 阶段有大量的 swc Ident to_string, move to heap 会产生一定开销。测试 examples/with-antd, to_string耗时占比 7%。
在 https://github.com/umijs/mako/pull/980 中尝试小范围减少 to_string 有一些提升
可以试试直接用 Ident to_id 避免 to_string 操作
Id 是比较更加 swc 的用法
问题
tree shaking 阶段有大量的 swc Ident to_string, move to heap 会产生一定开销。测试 examples/with-antd, to_string耗时占比 7%。
在 https://github.com/umijs/mako/pull/980 中尝试小范围减少 to_string 有一些提升
建议
可以试试直接用 Ident to_id 避免 to_string 操作