Post your code and we can probably give you a better idea.
Some things to watch out for:
Don't write to the file every time. You can try streaming to the file, which means opening the file in the beginning, continually writing to the file, and then closing the file when you are done (standard Write Characters to File, etc, open, write, and then close the file, a VERY time consuming process.
Don't reconfigure your data acquisition each time. This includes configuration of the serial port. Again, you want to open the port, read periodically, and then close the port when you are done.