Hiw to improve MFC fprint writing performance? : I’m writting an MFC GUI program that plots graphs in real time whe it receives new data. It comes 30 data per a second. I’m adding a new fuction where writing a text file using fopen and fprint every time it receives new data. So, it creates 30 new text files per a second.

Because of the writting function, the problem is that the program looks pause, not updating the graphs in real-time. when I turn off the writting function, it works well. 

How can I resolve the problem? 

I appreciate your help in advance. Thanks!