INI keys ?

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
jacky
XYwiki Master
Posts: 3106
Joined: 23 Aug 2005 22:25
Location: France
Contact:

INI keys ?

Post by jacky »

Code: Select all

v7.90.0030 - 2009-01-06 14:24
    * INI file: Enlarged the max size for keys from 1023 to 2047 bytes.
      Gives you more room for storing larger MiniTrees.
So, I'm a little confused right now, where does this limit apply exactly ? Because I'm reading that commands getkey and setkey for instance do read/write up to 32 766 characters for any given key, so is that wrong ? am I missing something ? or was there another limit for XY's own settings, which while raised remains quite lower to what scripts can do ??
Proud XYplorer Fanatic

admin
Site Admin
Posts: 66305
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: INI keys ?

Post by admin »

jacky wrote:

Code: Select all

v7.90.0030 - 2009-01-06 14:24
    * INI file: Enlarged the max size for keys from 1023 to 2047 bytes.
      Gives you more room for storing larger MiniTrees.
So, I'm a little confused right now, where does this limit apply exactly ? Because I'm reading that commands getkey and setkey for instance do read/write up to 32 766 characters for any given key, so is that wrong ? am I missing something ? or was there another limit for XY's own settings, which while raised remains quite lower to what scripts can do ??
Yes, I have full control over the limit (up to 32766 which is the official liit for INI files). I kept it low for the normal INI routines because it appeared to be a bit faster that way.
However, now, since I do the new way of INI reading (that was part of the recent speed up), this limit is completely irrelevant. I could probably allow 2GB (as long as it is in one line... :P ) per key... hmmm. I mean, I don't even have to allow it -- it would just work. (No time to try right now but you can easily test by feeding it an ultra-large minitree and measuring the key length in an editor...

BTW, getkey and setkey still use the traditional API way so here the limit is definitely 32766.

jacky
XYwiki Master
Posts: 3106
Joined: 23 Aug 2005 22:25
Location: France
Contact:

Re: INI keys ?

Post by jacky »

admin wrote:However, now, since I do the new way of INI reading (that was part of the recent speed up), this limit is completely irrelevant. I could probably allow 2GB (as long as it is in one line... :P ) per key... hmmm. I mean, I don't even have to allow it -- it would just work. (No time to try right now but you can easily test by feeding it an ultra-large minitree and measuring the key length in an editor...

BTW, getkey and setkey still use the traditional API way so here the limit is definitely 32766.
Okay, thanks. So that would mean I can just ignore this new limit (2047) then, right?

About the testing part, how would I do that ? I did get myself a quite large Mini Tree then saved my settings, but it wasn't saved (I mean it wasn't my current MT that was on the INI). I then switched to Maxi Tree and did a Load Last Mini Tree, but it's not my overly fat MT that was loaded back, so does that mean it was above the 2047 limit which still applies, or that this isn't how I'm supposed to do to get it saved/remembered like that ? Gotta admit, using my own saved Mini Trees I'm actually not very familiar with the native XY way... :oops:
Proud XYplorer Fanatic

admin
Site Admin
Posts: 66305
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: INI keys ?

Post by admin »

jacky wrote:
admin wrote:However, now, since I do the new way of INI reading (that was part of the recent speed up), this limit is completely irrelevant. I could probably allow 2GB (as long as it is in one line... :P ) per key... hmmm. I mean, I don't even have to allow it -- it would just work. (No time to try right now but you can easily test by feeding it an ultra-large minitree and measuring the key length in an editor...

BTW, getkey and setkey still use the traditional API way so here the limit is definitely 32766.
Okay, thanks. So that would mean I can just ignore this new limit (2047) then, right?

About the testing part, how would I do that ? I did get myself a quite large Mini Tree then saved my settings, but it wasn't saved (I mean it wasn't my current MT that was on the INI). I then switched to Maxi Tree and did a Load Last Mini Tree, but it's not my overly fat MT that was loaded back, so does that mean it was above the 2047 limit which still applies, or that this isn't how I'm supposed to do to get it saved/remembered like that ? Gotta admit, using my own saved Mini Trees I'm actually not very familiar with the native XY way... :oops:
Oh, right, I was still checking that limit when writing the INI. Will be removed in next version...

Post Reply