aron9forever |
12-04-2017 06:17 |
Re: a small question: fgets or read_file, which is faster?
Quote:
Originally Posted by DjSoftero
(Post 2563889)
so I just wrote crap ton of config file reading just to recode everything. nice
|
shouldn't matter if you only do the file parsing once per map (like to read a config)
Quote:
Originally Posted by HamletEagle
(Post 2563873)
I'm not entirely sure, client_disconnect is deprecated because it wasn't working quite right. write_file/read_file are working, they are just inefficient. That's up to Arkshine I guess.
|
true, but there is no reason to use *_file instead of f*(), maybe no reason to keep them except backwards compatibility, so it should be avoided for newly written scripts
I'm also considering which topics is google more likely to fetch when people search "amxx write to file" or "amxx read from file", also this tut which popped up for me https://forums.alliedmods.net/showthread.php?t=46218 which although explains both methods quite well, a lot of newbs might be tempted to go for "quick and easy"
this is kind of what happened with mysql_*() functions in PHP, technically not broken but still deprecated due to more secure stuff being added, yet still too many people use it
|