|
Joined: May 2018
Posts: 6
Nutrimatic drinks dispenser
|
OP
Nutrimatic drinks dispenser
Joined: May 2018
Posts: 6 |
Hello, it is possible in an update that hash tables were faster at the time of reading the entire table?
For example, a loop
fopen .. While (!$Feof) && (!$Ferr)
it's much faster than
While ($hget(n,%a).item)
Is there a big difference, could this be enhanced?
Thank you
|
|
|
|
Joined: Jul 2006
Posts: 4,193
Hoopy frood
|
Hoopy frood
Joined: Jul 2006
Posts: 4,193 |
You can use $hfind(table,*,0,w,echo -a $1-) to get all the item, this is much faster.
#mircscripting @ irc.swiftirc.net == the best mIRC help channel
|
|
|
|
Joined: May 2018
Posts: 6
Nutrimatic drinks dispenser
|
OP
Nutrimatic drinks dispenser
Joined: May 2018
Posts: 6 |
Yes but there is no option to use a dll called WhileFix.dll that freezes the loop and allows it to not get stuck, it is only for While
|
|
|
|
Joined: Feb 2003
Posts: 2,812
Hoopy frood
|
Hoopy frood
Joined: Feb 2003
Posts: 2,812 |
Why would anyone want to use such a .dll like that? Sounds like an ill-conceived concept, "whilefix". There's nothing broken about While.
If you're having a problem with loops taking too long to complete, the problem lies in your approach, not the platform. Consider what data you're trying to access, and how you can access it more efficiently, prefetch, in segments, or whatever translates into the minimum amount of work that's actually necessary.
What is the data you are working with, why do you need to traverse IT ALL, on demand, when?
I have worked with hash tables containing 6 million items. It's not an issue if you plan ahead.
Well. At least I won lunch. Good philosophy, see good in bad, I like!
|
|
|
|
Joined: May 2018
Posts: 6
Nutrimatic drinks dispenser
|
OP
Nutrimatic drinks dispenser
Joined: May 2018
Posts: 6 |
sounds crazy but I have made an irc server and I find it very slow when a channel there are about 300 users the ircd must send all the ones inside the channel the JOIN and the one that comes in there, hence the idea of ​​freezing the loops so that mirc does not get stuck
|
|
|
|
Joined: Jan 2004
Posts: 2,127
Hoopy frood
|
Hoopy frood
Joined: Jan 2004
Posts: 2,127 |
Are you trying to say you're making a mIRC script be the ircd itself? If you're sending the JOIN message when someone joins, you're also sending 300 messages each time someone chats a message to the channel too, as well as a whole lotta other events like /nick /part /quit /ban /kick /action etc.
|
|
|
|
Joined: May 2018
Posts: 6
Nutrimatic drinks dispenser
|
OP
Nutrimatic drinks dispenser
Joined: May 2018
Posts: 6 |
If, therefore, more users the longer is the while, and all this each sock has its own data buffer, the problem is that it is blocked and has a considerable delay, hence the idea of ​​using WhileFix
And mIRC 7.52 has an error with the / timer, they stop working
|
|
|
|
Joined: Jan 2004
Posts: 2,127
Hoopy frood
|
Hoopy frood
Joined: Jan 2004
Posts: 2,127 |
Is there a simple snippet where you can demonstrate a /timer stops working?
|
|
|
|
Joined: May 2018
Posts: 6
Nutrimatic drinks dispenser
|
OP
Nutrimatic drinks dispenser
Joined: May 2018
Posts: 6 |
|
|
|
|
Joined: Jul 2006
Posts: 4,193
Hoopy frood
|
Hoopy frood
Joined: Jul 2006
Posts: 4,193 |
If mIRC is under extreme load, timers will stop working yes, but only in these extreme cases, saying timers are not working is a bit vague because a lot of users are using timers as we speak on 7.52, probably without any issue. If your timer are stopping because mirc is processing a lot of things, then it probably wouldn't work either with whilefix, otherwise, can you describe how to get timers to stop?
#mircscripting @ irc.swiftirc.net == the best mIRC help channel
|
|
|
|
|