With a C# .NET core application code under Windows I'm receiving a large amount of single byte array data per second from an external device into computer's RAM memory. In C# I then copy this array data to hard disk and send the file location to a Python program to processes it and I use the following method for that:
File.WriteAllBytes(filePath, data);
For C# Python communication I use the way in selected answer here.
The reason I first save the data array in RAM into hard disk instead of sending it directly to Python, when I tried it I get the following error:
System.ComponentModel.Win32Exception: 'An error occurred trying to start process The filename or extension is too long.'
I noticed that if I try to pass a large array I get the above error. By the way I also don't know whether passing the large amount of byte array from C# to Python directly would be faster or not.
So I stick with saving the file and then accessing it by Python. But in this case to explain the speed in rough terms, how can I figure out how long time saving a byte array from RAM to hard disk? For such data transfer speed from RAM into hard disk(MB/sec) is there any estimation calculation based computer hardware specs or a method I can employ? (I'm using 64-bit Windows with 16 GB RAM and intel core i7 CPU)