#31833 - 2002-11-05 07:41 AM
Ini filesize problem........ (is there a size limitation?)
|
Boppe
Lurker
Registered: 2002-11-05
Posts: 2
|
Hi,
Having browsed a lot through the forum and learned, I'm hoping you can help me with this one (first post). I created a huge script copying SMS hardware/software inventory functionality supportinf all Windows OS's available. Everything working fine but, implemented on large networks the ini files (used for storing all the hardware information in pipe and quote delimited format for importing into a database) tend to grow quite a bit. When growing over approximately 50Kb, the WriteProfileString writes just half the line when a new machine wants to write his inventoried info and stops. New/Extra machines/lines don't get written at all. In other ini files (software inventory) the ini file itself get's bigger but the individual lines are not as "wide"/the string after "@MACADDRESS" (="bla"|"bla"|... ) is not as long and works fine.
I know there is a max size on an ini file but haven't figured out a workaround within kix... Does anyone know a workaround ?
I'm using 3.63 with All OS's supported.... If you would like to see the code I have to e-mail it to you as otherwise this forum would be overloaded with code....
Hope you can help !
Boppe
(MCA: extend subject) [ 08. December 2002, 14:12: Message edited by: MCA ]
|
Top
|
|
|
|
#31838 - 2002-11-05 05:24 PM
Re: Ini filesize problem........ (is there a size limitation?)
|
Boppe
Lurker
Registered: 2002-11-05
Posts: 2
|
OK Thanks a lot guys. I now know I do not have to search any further.
BTW the limitation is, as far as I tested, not just 9x related. NT/2000/XP OS's might be able to work with large ini files using their own API's but using KIX 3.63 on higher platforms gave the same results... (Which does not explain it 'cause as far as I know kix calls native OS API's doesn't it ?) It's probably a combination of KIX and large ini files.
Thanks !
Boppe
|
Top
|
|
|
|
#31839 - 2002-11-05 05:38 PM
Re: Ini filesize problem........ (is there a size limitation?)
|
Howard Bullock
KiX Supporter
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
Ok, "Monty Python and the Holy Grail" is making the rounds again.
|
Top
|
|
|
|
#31840 - 2002-11-05 06:07 PM
Re: Ini filesize problem........ (is there a size limitation?)
|
Kdyer
KiX Supporter
Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
|
> Yes, there's a size limit with ini files, just can't remember what it was (64k ???) ...
You are correct..
From the days of when W95 came out, Microsoft recognized the 64K limitation and went to the registry.
Kent [ 05. November 2002, 18:07: Message edited by: kdyer ]
|
Top
|
|
|
|
#31841 - 2002-12-08 02:11 PM
Re: Ini filesize problem........ (is there a size limitation?)
|
MCA
KiX Supporter
Registered: 2000-04-28
Posts: 5152
Loc: Netherlands, EU
|
Dear,
The 64KB limit is a theoretical one. We are running INI with size above 256KB. More important is how fast your servers can react on WriteProfileString requests.
In the earlier days we were using complex keys, which creates nearly always an new entry. Now we are using another method. The first file contains only short keys with an unique result included. This unique value can point to a set historical files, which contains the whole information about your environment. To base the filenames of those historical files on f.e. date notation prevents too big files, which can be hard to handle for catching useful information out of it.
Most important for us is, that most wanted information for trouble-shooting can be available in a very shorttime. greetings.
|
Top
|
|
|
|
#31842 - 2002-12-08 03:15 PM
Re: Ini filesize problem........ (is there a size limitation?)
|
Howard Bullock
KiX Supporter
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
When using and INI file that is located across a network connection, the file size may not be as important as the network traffic generated and resulting latency because each WriteProfileString causes the complete READING and WRITING of the entire INI file and each ReadProfileString READS the entire file.
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 165 anonymous users online.
|
|
|