I may have missed seeing this, but are you specifying the section when loading/saving the hash table from/to the ini file?

If you aren't, then why not just use the /hsave command, and not worry about the fact that you're currently using an ini file.

This, imo, has the following advantages:
1) There's no need to worry about the number of lines in the file
2) You don't have to worry about the 64k "limit" on ini files.

Regarding speed, I have a bot which currently has 8 hash tables, of which 3 of them use files that are nearly 25,000 lines (when checking the number of lines in the saved file), and it only takes about 3 seconds to load all 8 tables.