Small TPS files are generally not a problem, especially with todays hardware, like Gb switches, SSD/NVMe hard drives, more ram, faster ram and faster CPU’s with more instruction sets, I mean Xeon’s just fly.
But, roll back 20 years and the hardware back then was a lot slower and once those TPS files start growing, the time taken for record and file locks to negotiate becomes much more noticeable.
Saying that, there’s more built into windows today, and arguably Windows has got slower in places with some of the extra security built in.
If using ABC, you can increase the length of time spent waiting for record & file locking in the classes, and should be able to do similar with the Clarion templates but even the hard disk file system can be a factor. NTFS has file streams which can make things faster than a FAT32 or ExFat file system.
A million records sound like a lot, but how many bytes is the record length?
This is where file checksums wont work sadly. You might be able to spot some thing using a hex editor like the free HxD, but a million records could be like looking for that needle in a haystack. You could probably build some RegEx strings to scan for the problem but its not going to be any mean feat.
One thing I have found in the past with corrupted TPS, is to use TopScan to look at the data using the different keys. Usually one of the Keys has messed up and you can see problems with the sort order. In fact I would probably do this first before using a Hex editor.
If you log and analyse the network traffic, you should get see how much data is being shifted over the network. If you know your user base, you might be able to see what parts of the program generate alot of network traffic which could be used to see if any changes to the TPS file structure could reduce the network traffic.
For example if monthly reports generate alot, consider a background process/service/dct trigger that builds a TPS file with the collated monthly data. Its what all the mainframers and early PC users had to do, to get around the lack of speed in the olden days.
If this file conversion process isnt running on the server, see if it can happen on the server, then you speed up the conversion process and free up the network. Networks can introduce problems, especially when under load so removing factors from the conversion process can all help.