mIRC Homepage
Posted By: RoK Encourage reading in While $hget - 07/05/18 06:54 PM

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
Posted By: Wims Re: Encourage reading in While $hget - 07/05/18 07:10 PM
You can use $hfind(table,*,0,w,echo -a $1-) to get all the item, this is much faster.
Posted By: RoK Re: Encourage reading in While $hget - 20/05/18 07:46 PM
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
Posted By: Raccoon Re: Encourage reading in While $hget - 21/05/18 12:39 AM
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.
Posted By: RoK Re: Encourage reading in While $hget - 21/05/18 01:01 PM
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
Posted By: maroon Re: Encourage reading in While $hget - 21/05/18 03:46 PM
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.
Posted By: RoK Re: Encourage reading in While $hget - 21/05/18 06:09 PM
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
Posted By: maroon Re: Encourage reading in While $hget - 21/05/18 08:14 PM
Is there a simple snippet where you can demonstrate a /timer stops working?
Posted By: RoK Re: Encourage reading in While $hget - 25/05/18 01:56 PM

I do not cause it
Posted By: Wims Re: Encourage reading in While $hget - 25/05/18 02:29 PM
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?
© mIRC Discussion Forums