Rahul
2010-02-18 12:20:53 UTC
Hi All,
My application writes data in a file using fopen/fwrite/fclose and
immediately after fclose I try to open the same file using. the
windows CreateFile() function.
In one of my machine all are very fast and the total process finishes
in < 4 seconds.
But on one machine fclose itself takes around 15 seconds, I tried
using setbuf(fp, NULL) and calling fflush(fp) after every write, but
then also fclose took 15 seconds. I also tried using the low level
functions _open, _close etc. but there also the _close took 15 second
of time.
What is more strange to me is that there is one more machine on which
fopen/fwrite/fclose works quite fast but the last CreateFile() call
takes > 15 seconds to open the same file.
Is thee any way of debugging such machine specific issues. All the
machine have same OS (win XP SP3 and exactly the same windows
updates). The only difference is in the hardware i.e. CPU, hard disk,
RAM configuration all are different. But I could not find any clue
about where to look at.
Could somebody please tell me about how do I go debugging such
problems, Is the delay caused by the OS or the Hard disk device driver
or something else?
Thanks in advance
Rahul
My application writes data in a file using fopen/fwrite/fclose and
immediately after fclose I try to open the same file using. the
windows CreateFile() function.
In one of my machine all are very fast and the total process finishes
in < 4 seconds.
But on one machine fclose itself takes around 15 seconds, I tried
using setbuf(fp, NULL) and calling fflush(fp) after every write, but
then also fclose took 15 seconds. I also tried using the low level
functions _open, _close etc. but there also the _close took 15 second
of time.
What is more strange to me is that there is one more machine on which
fopen/fwrite/fclose works quite fast but the last CreateFile() call
takes > 15 seconds to open the same file.
Is thee any way of debugging such machine specific issues. All the
machine have same OS (win XP SP3 and exactly the same windows
updates). The only difference is in the hardware i.e. CPU, hard disk,
RAM configuration all are different. But I could not find any clue
about where to look at.
Could somebody please tell me about how do I go debugging such
problems, Is the delay caused by the OS or the Hard disk device driver
or something else?
Thanks in advance
Rahul