Maintain file open
#1

Hello!

Is it a good practice to keep log files open throughout the uptime of the server instead of fopen & fclose everytime you log something?

E.g

Код:
-fopen
-fwrite
-fclose

REPEAT EVERYTIME

vs

GLOBAL var file + fopen
REPEAT fwrite
ON SHUTDOWN fclose
I usually keep files open, but it seems that pawn people don't do this.Is there a reason or what?It's obv. faster to open once.

LE:I don't see any issue memory wise as there's only about 20 not that large files to keep open.
Reply


Messages In This Thread
Maintain file open - by Yvax - 17.02.2016, 11:57
Re: Maintain file open - by BiosMarcel - 17.02.2016, 12:21
Re: Maintain file open - by Yvax - 17.02.2016, 19:16
Re: Maintain file open - by BiosMarcel - 17.02.2016, 20:32
Re: Maintain file open - by Gammix - 17.02.2016, 20:40
Re: Maintain file open - by Yvax - 18.02.2016, 13:40

Forum Jump:


Users browsing this thread: 7 Guest(s)