Quote:
Not sure where you read that, but my own experimentation with INI files would seem to indicate otherwise, since there is a record of hard drive activity when the $readini command is issued.

Unfortunately, I can't find the url anymore :S but .... A few months ago I made an AI script that recognizes phrases in sentences typed in by chatters and returns one of the possible answers belonging to that phrase. I have stored the phrases in some items in an ini file, let them read them one by one with READINI and have them checked by using "isin" and "$istok" against the sentences. At the moment, the AI bot can recognize over 400 phrases, so in the worst case (that is when it only recognizes his nickname which happens often) it has to perform $readini over 400 times. I have put this bot in 20 rooms (the maximum for that server) and experienced no significant degrade of performance. Even more, the bot contains 22 other scripts for flood protection, auto kick of blacklisted nicknames, birthday checking, on join greeting, etcetera and those scripts perform well too. Kick on join of blacklisted people is done within a second. My PC has an 1 GHz processor which is not very fast nowadays. I have justed changed the script by reading all phrases at once in a variable and do the phrase recognition from there, thus reducing the number of $readini's considerably. The AI scripts seems to be about 2 seconds slower then!
Just recently I made an MP3 player script which searches for all mp3 files on my hard disk and places the filenames in a playlist. At first I did this with $findile(...., write playlist) and it took 10 seconds for 400 MP3's to fill the playlist. I optimized the script with $findfile(....., aline @customwindow) and then flushing the window contents with /savebuf to the playlist. Now it takes less than a second to fill the playlist and it is being sorted also.
My conclusions are: $readini is efficient (enough), but /write not.

Last edited by captain_comic; 10/01/06 06:02 PM.