I don’t see how any ordering will solve files changing faster than they can be transferred? You can however split it up into multiple folders (the syncthing kind), and they are handled in parallell.
Changing the ordering will not make it faster, it will just evenly distribute the syncs
It will make it so that the latest files in all folders have a chance to be sync rather than the unbalanced method of only getting to the top 10% of the files in the alphabetic ordinal system
This not about speed: but even distribution of synchronization operations.
Your alphabetic sequencing algorithm is not optimal
Agree it’s not brilliant, but I doubt asc or desc would solve the issue. Plus we do rely on the order as this way directories get created prior the content goes in them.
I have a pull request which allows bumping individual files as they are in transfer but that can be quite memory heavy hance hasn’t been merged.