Thank you for replies.
previosuly I used to design some test methods and write extra codes to know about the time consumed by the different processes, now I can us
microprofiler which I found to be very handy thanks
ok so now coming to the issue. ^^
so I noticed that the most time 9.01 sec is being consumed in writing text file function. While DMA read only took only few hundred ms (both for 500 files) please see the image
if you really really need speed you might want to skip tab seperated files and go for a binary format.
I tested already in the binary format earlier, and it took only extra < 0.3 seconds to save the file in binary format (all 500 files). Hence total around 0.6 seconds for Whole reading process from
FPGA -> DMA -> malloced buffer -> .bin file save
But when I did for tab-delimited
FPGA -> DMA -> malloced buffer in PC-> .txt file save
As planned in our system only when we need to save the files and use it for future. But to generate the movie at the run-time, we must take it as an excel file. This is the necessary part.
Moreover, I tried the ofstream (and although I knwo prior to this ofstream is dead slow, but when I tried this same process end up in 60 seconds....sigh sigh !!). Hence fprintf() looks the best available option for me now...
Do you have experience over making some sort of my own function or method to save the files ( I have not such experience, looking forward if can !!)
Otherwise please share any relevant idea so that I can bring this time as close to real-time as possible. (may be 5 seconds or less...thanks)