-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't formatting over 4 files with .sh
script
#25
Comments
.sh
script.sh
script
Can you run with |
Then the script script freezes and it is clear about the CPU load that there is no work. |
Ok, that looks like a dprint bug. Thanks for the output. I'll look into it. |
@doox911-opensource I haven't been able to reproduce it yet on multiple machines. When you get a chance, would you be able to try setting the If it's too much of an ask, I also wonder if this occurs in dprint 0.39.1 and starts occurring in 0.40.0. |
Script: # /bin/sh
echo "dprint:"
START=$(date +%s%N)
CI=1 npx dprint fmt --incremental=false --verbose
END=$(date +%s%N)
milliseconds=$((($END - $START)/1000000))
seconds=$(($milliseconds/1000))
minutes=$(($seconds/60))
echo "$milliseconds"
echo "$seconds"
echo "$minutes" or just a command: time npx dprint fmt --incremental=false large-file_*.json or npx dprint fmt --incremental=false large-file_*.json The problem is observed not only when running dprint in the script Result:
For dprint 0.39.1:
|
There were some memory improvements made in 0.19.2. Not sure if that fixes it, but maybe. I still haven't been able to reproduce this one. Going to dump the test script I've been using that sets this up so I don't lose it again: import $ from "jsr:@david/[email protected]";
const data = await $.request("https://raw.githubusercontent.com/Nilstrieb/jsonformat/master/benches/large-file.json")
.text();
const tempDir = $.path("tempDir");
tempDir.ensureDirSync();
for (let i = 0; i < 100; i++) {
tempDir.join("file" + i + ".json").writeTextSync(data);
}
await $`dprint fmt --incremental=false`; |
OS
Windows 11 Pro. WSL 2.
11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz 2.80 GHz
RAM 16gb
Dprint version
0.41.0
JSON plugin
https://plugins.dprint.dev/json-0.17.4.wasm
dprint.json
My script
Log
I created 100 identical files from https://github.com/Nilstrieb/jsonformat/blob/master/benches/large-file.json.
When I format 4 files everything is fine! But when I try to format more, then I see a WARNING and not one file is formatted.
The text was updated successfully, but these errors were encountered: