“Argument list too long” is the error xargs exists to prevent. If you’re curious how long a command can get on your system, xargs can show the numbers.
xargs --show-limits < /dev/null
The < /dev/null gives xargs empty input, so it prints the limits and exits without running anything. In a container the output includes:
POSIX upper limit on argument length (this system): 2094894
Maximum length of command we could actually use: 2094684
Size of command buffer we are actually using: 131072
The first line is what the kernel allows, around 2 MB here. The last one is interesting: xargs itself uses a 128 KiB buffer, much less than the maximum. So with a long list, it starts a new command every 128 KiB, even though one command could hold far more. That’s on purpose, and I doubt it matters often.
When it does matter, for a slow command where each start costs time, you can raise the buffer with -s, up to that maximum.
The numbers depend on the environment too. Environment variables share the same space as arguments, so a shell with a lot of exported variables leaves less room. And --show-limits is GNU only; elsewhere, getconf ARG_MAX gives the kernel limit.
Further reading: xargs(1) manual page, GNU findutils manual: Invoking xargs