dprint-plugin-typescript
dprint-plugin-typescript copied to clipboard
Memory consumption on huge JS files
Hello,
I wrote a simple wrapper with bindings for Python where I'm using format_text
function to format potentially big JS files (1MB or more): https://github.com/alexkuz/python-rust-dprint. Unfortunately it gets stuck on ./test/node_modules.js
file in that repo, allocating a lot of memory. Here's a call:
https://github.com/alexkuz/python-rust-dprint/blob/ffac9f632b070729e0847742afad2bf759a8e420/src/lib.rs#L30
Interestingly, CLI version of dprint
works fine on that file.
I would appreciate if you could point on what could be a problem here (it could be that I'm using format_text
or Rust itself wrong, I don't have much knowledge of it)
dprint-plugin-typescript version: 0.67.0