diff --git a/pre_commit/languages/helpers.py b/pre_commit/languages/helpers.py
index aa5a5d1..7ab117b 100644
--- a/pre_commit/languages/helpers.py
+++ b/pre_commit/languages/helpers.py
@@ -2,12 +2,18 @@ from __future__ import unicode_literals
 
 import multiprocessing
 import os
+import random
 import shlex
 
+import six
+
 from pre_commit.util import cmd_output
 from pre_commit.xargs import xargs
 
 
+FIXED_RANDOM_SEED = 1542676186
+
+
 def run_setup_cmd(prefix, cmd):
     cmd_output(*cmd, cwd=prefix.prefix_dir, encoding=None)
 
@@ -64,5 +70,21 @@ def target_concurrency(hook):
                 return 1
 
 
+def _shuffled(seq):
+    """Deterministically shuffle identically under both py2 + py3."""
+    fixed_random = random.Random()
+    if six.PY2:  # pragma: no cover (py2)
+        fixed_random.seed(FIXED_RANDOM_SEED)
+    else:
+        fixed_random.seed(FIXED_RANDOM_SEED, version=1)
+
+    seq = list(seq)
+    random.shuffle(seq, random=fixed_random.random)
+    return seq
+
+
 def run_xargs(hook, cmd, file_args):
+    # Shuffle the files so that they more evenly fill out the xargs partitions,
+    # but do it deterministically in case a hook cares about ordering.
+    file_args = _shuffled(file_args)
     return xargs(cmd, file_args, target_concurrency=target_concurrency(hook))

Concurrent execution results in uneven work per thread
I'm running `pre-commit` from current `master` to test the concurrency feature introduced with #851. While it in general seems to work, work is distributed pretty uneven. One hook we run is [`prospector`](https://github.com/guykisel/prospector-mirror) which is nice for testing, because it takes a relatively long time and it prints the time taken in its output.

Running `pre-commit run -a --verbose prospector | grep "Time Taken"` on a medium sized project (~100 Python files) results in the following distribution of work to the available 4 logical CPU cores:
```
Time Taken: 17.10 seconds
Time Taken: 8.70 seconds
Time Taken: 18.68 seconds
Time Taken: 108.02 seconds
```

Especially compared to running it with concurrency disabled (using `PRE_COMMIT_NO_CONCURRENCY`), it's pretty obvious that concurrency doesn't provide any real benefit here:
```
Time Taken: 116.95 seconds
```

I'd be happy to help debugging this further. Just tell me what other information you need. :slightly_smiling_face: 
diff --git a/tests/languages/helpers_test.py b/tests/languages/helpers_test.py
index e7bd470..f77c305 100644
--- a/tests/languages/helpers_test.py
+++ b/tests/languages/helpers_test.py
@@ -62,3 +62,7 @@ def test_target_concurrency_cpu_count_not_implemented():
     ):
         with mock.patch.dict(os.environ, {}, clear=True):
             assert helpers.target_concurrency({'require_serial': False}) == 1
+
+
+def test_shuffled_is_deterministic():
+    assert helpers._shuffled(range(10)) == [3, 7, 8, 2, 4, 6, 5, 1, 0, 9]

pip install -e .[dev]
parse_log_pytest
requirements.txt
pytest
apt-get update apt-get install -y gcc
3.7
requirements-dev.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
aspy.yaml==1.3.0
cached-property==1.5.2
certifi @ file:///croot/certifi_1671487769961/work/certifi
cfgv==3.3.1
coverage==7.2.7
distlib==0.3.9
exceptiongroup==1.2.2
filelock==3.12.2
flake8==5.0.4
identify==2.5.24
importlib-metadata==6.7.0
iniconfig==2.0.0
mccabe==0.7.0
mock==5.2.0
nodeenv==1.9.1
packaging==24.0
platformdirs==4.0.0
pluggy==1.2.0
-e git+https://github.com/pre-commit/pre-commit.git@6b6ebe7e3015ac72bc3c3e4e1515975e1c009a22#egg=pre_commit
pycodestyle==2.9.1
pyflakes==2.5.0
pytest==7.4.4
pytest-env==1.0.1
PyYAML==6.0.1
six==1.17.0
toml==0.10.2
tomli==2.0.1
typing_extensions==4.7.1
virtualenv==20.26.6
zipp==3.15.0

name: pre-commit
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - certifi=2022.12.7=py37h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.4.4=h6a678d5_1
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=1.1.1w=h7f8727e_0
  - pip=22.3.1=py37h06a4308_0
  - python=3.7.16=h7a1cb2a_0
  - readline=8.2=h5eee18b_0
  - setuptools=65.6.3=py37h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - wheel=0.38.4=py37h06a4308_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - aspy-yaml==1.3.0
      - cached-property==1.5.2
      - cfgv==3.3.1
      - coverage==7.2.7
      - distlib==0.3.9
      - exceptiongroup==1.2.2
      - filelock==3.12.2
      - flake8==5.0.4
      - identify==2.5.24
      - importlib-metadata==6.7.0
      - iniconfig==2.0.0
      - mccabe==0.7.0
      - mock==5.2.0
      - nodeenv==1.9.1
      - packaging==24.0
      - platformdirs==4.0.0
      - pluggy==1.2.0
      - pycodestyle==2.9.1
      - pyflakes==2.5.0
      - pytest==7.4.4
      - pytest-env==1.0.1
      - pyyaml==6.0.1
      - six==1.17.0
      - toml==0.10.2
      - tomli==2.0.1
      - typing-extensions==4.7.1
      - virtualenv==20.26.6
      - zipp==3.15.0
prefix: /opt/conda/envs/pre-commit

tests/languages/helpers_test.py::test_shuffled_is_deterministic
tests/languages/helpers_test.py::test_basic_get_default_version tests/languages/helpers_test.py::test_basic_healthy tests/languages/helpers_test.py::test_failed_setup_command_does_not_unicode_error tests/languages/helpers_test.py::test_target_concurrency_normal tests/languages/helpers_test.py::test_target_concurrency_cpu_count_require_serial_true tests/languages/helpers_test.py::test_target_concurrency_testing_env_var tests/languages/helpers_test.py::test_target_concurrency_on_travis tests/languages/helpers_test.py::test_target_concurrency_cpu_count_not_implemented
pre_commit/languages/helpers.py
pre_commit/languages/helpers.py