Raised This Month: $51 Target: $400
 12% 

INI File Reader/Writer AMXX 1.9


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
E1_531G
Senior Member
Join Date: Dec 2017
Old 05-28-2019 , 01:11   Re: INI File Reader/Writer AMXX 1.9
Reply With Quote #11

Hello again.
I think this API misses one very good thing: natives for keeping file open for some time, for multiple-writings/readings.
You can see similar feature in SQLVault: https://forums.alliedmods.net/showthread.php?t=146849

For example:
1. I know i have to read 3 settings keys from the file
2. I use: ini_init( ... )
3. I use 3 times: ini_read_int( ... )
4. I use ini_end( ... )

How it works?
ini_init() creates a global temporary file pointer.
if ini_read_int or others natives see what that global pointer is available they use it instead of opening and closing the file again and again.
ini_end() kills that global pointer.

Maybe it is not a big deal speaking about performance, but think a bit, when you use an API like this one you almost always know which keys you have to read and how many they are.
__________________
My English is A0

Last edited by E1_531G; 05-28-2019 at 01:13.
E1_531G is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 10:22.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode