As you know HTBasic cannot handle new computers with multi-core CPUs.
This can slow down calculations or file storage enormously.
The solution is to force the modification of the affinity so as to increase the processor number used during resource-intensive operations.
On the other hand, during screen displays, it is better to keep the original affinity on single processor.
To do this job I use the NirCmd freeware utility, to download here : https://www.nirsoft.net/utils/nircmd.html
Please find bellow my code. Hope that help somebody …
Application$=”C:\Program Files (x86)\”&Application$
Affinity=0 ! Normal case
Affinity=4 ! For test, To use multi-core processors 0 to 4
Disque$=Nircmd_directory$ ! Need to be completed with the correct directory …
FOR I=1 TO Affinity
Command$=”cmd /C start /MIN “&Prog$&” setprocessaffinity “&””””&Application$&””””&K$