Allen - yeah, it was a crazy day and I thought I saw ReadProfileString in those functions, which would have performed duplicate INI reads.. my mistake.

Shane - time flies, whether you're having fun or not!

Note the recent code update on this UDF.. I'm getting slightly better performance loading the array with LARGE files and ironically slightly worse performance with tiny (1-2K) files, but we're talking 32-48ms worst on small files, but 100-500+ ms gains on larger files. Also, the worst-case is an estimate because the resolution of Kix @MSECS macro I used for timing is 16ms.

More importantly, the new version corrects a bug that can occur when your INI file contains a section with no keys. Technically, not valid, but possible with hand-written INI files. The old version loaded the section with no keys and threw an error when you asked for a key. The new code ignores empty sections on read.

I just updated the Universal Login Script to use IniArray and shaved 600ms off of a typical config, bringing production execution time for the script to under 2 seconds! Script overhead is just 750ms - the time it takes to load and process an empty config.

Glenn
_________________________
Actually I am a Rocket Scientist! \:D