Does anybody know the limitations of an INI file? Specifically, I'm looking for how big an INI file is allowed to be.
I know I've seen the different limits listed somewhere before, but I can't find them anymore.
And this is with MMF 1.5, if it makes a difference.
I don't know if INI's really have a limit, I think you just rapidly add onto them and their file size gets bigger.
An INI file is nothing more then an organized txt file that can be opened up in any word or notepad styled program, so that programs can easily interact and exchange information with it. So yeah, I wouldn't count on hitting a specific ceiling or anything.
PS: This may be news to some people, but hopefully not. INI files are not just a TGF, MMF, or MMF2 thing. INI files are used for just about anything that requires quick non-secure ways to save bits of information for the next time the program is opened. Large applications, games, even Windows use INI's to store things like Options or player ID's and stuff.
H'm... I'm almost certain I saw a size limit described somewhere (it might have been an MMF/INI type limit).
I know there's a maximum number of characters you can send or retrieve as a string (which can be rather readily reached), and that the program will crash if you try accessing the INI too many times in one runtime-frame (which is a pain)...
But it's the file size that's important right now. I just don't remember what it was...
is it just the .ini file extension that has a limit?
Or does the 64kb limit apply to any file being passed through the ini extension in mmf?
If it's the former, just use a different filename (pretty sure the ini object reads it the same)
If it's the latter, then stop using so many characters in your ini group/object names.
My signature is never too big!!!
DaVince This fool just HAD to have a custom rating
Registered 04/09/2004
Points 7998
16th July, 2007 at 19:32:15 -
INIs are just text files, so I seriously doubt there's a limit on that. If the INI object is coded correctly, it should be able to handle immensely big INI files, too.
Old member (~2004-2007).
Deleted User
16th July, 2007 at 19:37:18 -
There's a sort of performance limit of 1024KB. It'll probably run any size of ini file, but you'll probably get slowdown when accessing larger files. I doubt it'd really make a difference on newer computers anyway.
Go into note pad. Type up a bunch of information, save it as a text file. Go find the file. Change the .TXT to .INI and it will work perfectly fine with programs searching for it.
Assault Andy Administrator
I make other people create vaporware
Registered 29/07/2002
Points 5686
17th July, 2007 at 01:36:54 -
Yeah apparently there is a 64kb limit. Although, I have never encountered it myself. It has never really made sense to me why the file could only be 64kb. In fact I'm going to make a test right now in MMF2.
[some time passes]
Okay that 64kb limit seems like a myth. It didn't make any sense to begin with. I just made a demo app that ran 30,000 loops, adding random data to an ini file with the ini object. The ini file created is 654kb. I then tried retrieving values and it all works fine.
So there's the definite answer. No apparent filesize limitations. And if you're using more than 500kb in an ini file, then there's got to be a more efficient way of programming your application.
And if you're using more than 500kb in an ini file, then there's got to be a more efficient way of programming your application.
Agreed, that'd be a gigantic .ini file!!
If you want to encrypt it you should know that I've had problems with the blowfish object in the past, and I also have MMF1.5.
If it's anything like my array troubles, know that while it's reading or writing and a value that's in the file is also going on in an "always" event there can be problems. I couldn't get my array to work before but after taking out the "always" event it worked fine. I never did go back and test this out with the ini though.
Edited by the Author.
--
"Del Duio has received 0 trophies. Click here to see them all."
"To be a true ninja you must first pick the most stealthy of our assorted combat suits. Might I suggest the bright neon orange?"
DXF Games, coming next: Hasslevania 2- This Space for Rent!
There probably aren't any file size restrictions, but you'll find that as it gets larger (in numbers of "groups" and "items") it also becomes much slower for MMF to access. I remember using an ini file for a replay mode (reading 6 items every 0:00.02) and it began to slow the game down after 2000 or so groups. Have you looked into using XML?
//
DaVince This fool just HAD to have a custom rating
Registered 04/09/2004
Points 7998
17th July, 2007 at 12:47:05 -
lol, using INI for replays IS very inefficient though!
Why do you think using an INI is very inefficient for recording replays? Whether you're using INI or an array, you'll still have a crapload of data stored in a file somewhere. An array might be slightly smaller, but that's all. Attempting to record the values of every object 50 times a second was a pretty stupid decision. That was the inefficient part, I'd say.
I'm genuinely asking that question, not just trying to stir something up. If there's a better way to record sequential data then I'd love to hear about it.
DaVince This fool just HAD to have a custom rating
Registered 04/09/2004
Points 7998
18th July, 2007 at 09:58:26 -
I'll correct some common misconeptions here.
- Filenames can be as long as the file system allows you to. This also depends on how many subdirectories you are in. If you're in C: the limit is close to 256 characters (if I remember correctly).
- File sizes have the limit of the maximum file size of the file system. This is a few hundred gigabytes in Linux with ext3 formatted partitions, and I forgot what it was in NTFS (but I think it's a few dozens of gigabytes too).
EDIT: Nim, if you're dealing with lots of data, don't use groups and keys which take up pretty much in a file. Use bytes, which will be much more efficient in this case (only one or two characters of a file to put down a value, instead of a few for the group, then a line break, then some more for the id and value).