Skip to content

Can't formatting over 4 files with .sh script #25

Description

@doox911-opensource

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

{
  "plugins": [
    "https://plugins.dprint.dev/json-0.17.4.wasm"
  ]
}

My script

# /bin/sh

echo "dprint:"

START=$(date +%s%N)
  
npx dprint fmt --incremental=false
  
END=$(date +%s%N)

milliseconds=$((($END - $START)/1000000))

seconds=$(($milliseconds/1000))

minutes=$(($seconds/60))

echo "$milliseconds"
echo "$seconds"
echo "$minutes"

Log

WARNING: Formatting is slow for [my_path]/jsonformat/benches/large-file_1.json
WARNING: Formatting is slow for [my_path]/jsonformat/benches/large-file_2.json
WARNING: Formatting is slow for [my_path]/jsonformat/benches/large-file_3.json
WARNING: Formatting is slow for [my_path]/jsonformat/benches/large-file_4.json
WARNING: Formatting is slow for [my_path]/jsonformat/benches/large-file_5.json
WARNING: Formatting is slow for [my_path]/jsonformat/benches/large-file_6.json
....

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions