mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Nov 2004
Posts: 842
Jigsy Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Nov 2004
Posts: 842
I'm working on some P10 IRC services in mIRC (yes they do work and yes they are stable) however if I go over the hash table limit of 10000 and need a loop to find a peice of information or list information (e.g. /msg B suspendlist) it'll go into an infinite loop.

I'm just wondering if the limit could be 65500 instead of 10000?


What do you do at the end of the world? Are you busy? Will you save us?
Joined: Feb 2004
Posts: 2,019
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
What are you talking about?

Hash table size is only limited by your ram.

Greets


Gone.
Joined: Nov 2004
Posts: 842
Jigsy Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Nov 2004
Posts: 842
well how come /hmake nicklist 65500 won't work?


What do you do at the end of the world? Are you busy? Will you save us?
Joined: Feb 2004
Posts: 2,019
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
Indeed that doesn't work, however from the help file:

A hash table can store an unlimited number of items regardless of the N you choose, however the bigger N is, the faster it will work, depending on the number of items stored.

It should work even if you only specify 10000, however, it may be slower. If so, I support your suggestion smile

Greets


Gone.
Joined: Dec 2002
Posts: 2,962
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
Passing 10000 to /hmake will make it capable of efficiently handling 100,000 or more entries.


Spelling mistakes, grammatical errors, and stupid comments are intentional.
Joined: Feb 2004
Posts: 2,019
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
Yea, I know about the 10x rule, and also stated that it would work for more entries, as stated in the help file, though perhaps slower.

I don't know how many items he wants to store lol, perhaps a million?

Greets


Gone.
Joined: Apr 2004
Posts: 218
P
Fjord artisan
Offline
Fjord artisan
P
Joined: Apr 2004
Posts: 218
It would be nice to see mIRC hold a unlimited ammount of data, such as
hmake -s test 10000 - Is the farthest I can go on my computer? Why does mIRC even limit the %variables - I use %vars more than $h* and sometimes I need to set alot of data to a %var but can't because it is too lrage
;/


Live to Dream & Dream for Life
Joined: Dec 2002
Posts: 788
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 788
There is no such thing as 'unlimited data', it will always be limited by either hard disk space or memory, depending on how the data is stored.

Eamonn.

Joined: Feb 2004
Posts: 2,019
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
Hi,

well regarding the hash tables, perhaps some people are confused with this, but the N number of slots that you set when making a hash table, doesn't represent the limit of the number of items that can be loaded.

For instance:

/hmake test 1 would mean that a table is made, taking into account that the total amount of items will be +/- (1*10) = 10

/hmake test 10 means a table is made, taking into account to contain around +/- (10*10) = 100 items

This on the other hand doesn't mean that the Hash Table is limited to that number that you put for N slots.

In the help file, it is clearly stated:
---------------------------------------

A hash table can store an unlimited number of items regardless of the N you choose, however the bigger N is, the faster it will work, depending on the number of items stored.

---------------------------------------

So if we do /hmake test 10000, it will create a hash table, taking into account an amount of items at +/- 100000

Though that doesnt mean you cant add more. You can add as many as you want, as long as your RAM lets you. The reason the N is there, is so that mIRC knows how much memory it is going to have to keep available for the hash table data to be stored in memory. The real limit here is in other words, your RAM.

Now the reason that the original poster requested this limit of 10000 for N to be increased, is because of: ".... however the bigger N is, the faster it will work, depending on the number of items stored." Meaning it would be (prolly) be faster to do /hmake test 100000 and load 1 million items, than /hmake test 10000 and load 1 million items. If that wasn't the reason, then I suppose he also thought N would mean the max. number of possible items, which means there is good news for him.

Regarding the "string too long" issue, yes, that is indeed annoying, but there are sometimes ways around that. Binvars etc. come to mind.

Greets


Gone.
Joined: Dec 2002
Posts: 2,962
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
For a million or more entries he should use a real database instead of a hash table. Think about it, a non-binary hash table entry can hold around 940 characters (bytes). Without knowing the specific use we'll have to assume that on average each entry is half filled (460 bytes). 460B * 1000000 = 448.23MB. Even today most computers ship with around 512MB of main memory, and a modern OS like XP will easily take up 100MB of that, it's simply not practical to use that kind of memory.


Spelling mistakes, grammatical errors, and stupid comments are intentional.
Joined: Aug 2004
Posts: 42
T
Ameglian cow
Offline
Ameglian cow
T
Joined: Aug 2004
Posts: 42
Firstly, he was only talking about 10,000 entries.
Secondly, the average size of each entry is probably much smaller like 32 chars.
Thrirdly, he obviously wants to do something in mirc, and its not very practical to be trying to link it to an external database.

Joined: Dec 2002
Posts: 2,962
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
  • Hash tables already easily support 10000 entries. If you read FiberOptics' post you'll see he specifically talked about 1 million entries as being something that they might not currently be efficient at handling.
  • You have no more idea than I do of what the average size of entries would be that someone might use, which is why I used the average assuming each entry could be from 1 to 940. Obviously for any specific use that might not be correct, but for hash table usage in general it should be.
  • Connecting to a database is simply a matter of using COM or a DLL, it's really not that hard. And the fact is that very large collections of data is precisely what a database is designed for.


Spelling mistakes, grammatical errors, and stupid comments are intentional.
Joined: Aug 2004
Posts: 42
T
Ameglian cow
Offline
Ameglian cow
T
Joined: Aug 2004
Posts: 42
database programs arent free. hash tables are :P
And you didnt use the average entry size. you used 1/2 the maximum size :P

Joined: Dec 2002
Posts: 788
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 788
mysql database.. free.

And, he used half because its more realistic than just throwing '32' out of no-where.

Eamonn.


Link Copied to Clipboard