mIRC Home    About    Download    Register    News    Help

Print Thread
Use more Threads in mIRC! #4164 31/12/02 06:37 AM
Joined: Dec 2002
Posts: 27
G
GTS Offline OP
Ameglian cow
OP Offline
Ameglian cow
G
Joined: Dec 2002
Posts: 27
Its buggin me for a while now, so i'll write it down ...

I don't know if it is a bug though ... but its really annoying.

For a guy like, me - who has some programming experience - the issue for the following problem is prolly, that you're using to less threads or no threads at all.

My task manager reports 8 running threads on mIRC ( connected to 5 servers, 40 channels, 3 dcc-gets).

some examples:
If i load a huge logfile (1+ megs) into a custom window, press ctrl+f ... and try to search for something rare, my mirc hangs (cpu usage 100%, app isnt possilble to receive any user-input ... ) until it finds a match or the logfile ends.
If the file is REALL huge ... i'll get disconnected from servers (ping timeout) and all runing dcc-gets/sends are stoppin (prolly timeout too).

If i echo a LOT of stuff endlessy to a window, the same happens.
that means if somebody floods me on a dcc chat, and i havent any flood protection enabled (but an "on text"script, for a nicer display), my mIRC hangs and is getting disconnected.

And yes, i am using mIRC 6.03 (Windows 2000 Pro / Athlon 1,2G, D-link eithernet adapter ... dsl ).

If something is unclear, please ask ... cuz my English isnt that good, and i make mistakes sometimes wink


proud to be baka
--> GTSdll Homepage <--
Re: Use more Threads in mIRC! #4165 31/12/02 08:08 AM
Joined: Dec 2002
Posts: 1,321
H
Hammer Offline
Hoopy frood
Offline
Hoopy frood
H
Joined: Dec 2002
Posts: 1,321
Loading a file that big into a custom window is ASKING for trouble. You might look into /help /filter or even /help $read. As for the flooding problem, you might think about using one of the many fine flood protection scripts available (or write your own).


DALnet: #HelpDesk and #m[color:#FF0000]IR[color:#EEEE00]C
Re: Use more Threads in mIRC! #4166 31/12/02 08:43 AM
Joined: Dec 2002
Posts: 27
G
GTS Offline OP
Ameglian cow
OP Offline
Ameglian cow
G
Joined: Dec 2002
Posts: 27
I know what to to, if i dont want to be flooded. And of course i know that it isnt quite good to load a big file into a custom mIRC window.

Loading of the file isnt really my problem, cuz its really fast.
But opening a new thread for "searching for text in a window" would be nice.

This issue isn't just a problem of custom windows.
If i search for something on a really full and lively channel, it will also lock mIRC until the search function found something.

Applying threats to CPU intensive functions is always better, cuz it wouldn't block the whole application while the function is running.


proud to be baka
--> GTSdll Homepage <--
Re: Use more Threads in mIRC! #4167 31/12/02 09:00 AM
Joined: Dec 2002
Posts: 103
Pasmal Offline
Vogon poet
Offline
Vogon poet
Joined: Dec 2002
Posts: 103
I think one of the reasons why mIRC doesn't have more threads... say one for each channel or whatever, is because of the concurrency issues involved for mIRC scripts.

Re: Use more Threads in mIRC! #4168 31/12/02 09:38 AM
Joined: Dec 2002
Posts: 27
G
GTS Offline OP
Ameglian cow
OP Offline
Ameglian cow
G
Joined: Dec 2002
Posts: 27
Might be True.

If i think about it, applying an own thread to the "incoming / outgoing"-messages buffer would be nice.

If i think more about it, the buffer could already be in an own thread, but cannot be processed cuz the thread responsible for processing the buffers is in use (by scripts, or by the search function in this case).

I know workin with threads isnt that easy.

If i think more about the "seach in windows issue" i think just putting a command to "pause the search, and process windows messages" like "Applicaion.ProcessMessages;" in Delphi (i don't know C++ frown ) in the responsible function would be enough.


proud to be baka
--> GTSdll Homepage <--
Re: Use more Threads in mIRC! #4169 31/12/02 06:07 PM
Joined: Dec 2002
Posts: 1,527
_
_D3m0n_ Offline
Hoopy frood
Offline
Hoopy frood
_
Joined: Dec 2002
Posts: 1,527
lol why not think about not sitting in 40 channels that u couldnt possibly chat in all of them if ur life depended on it?? ...... lol either that or ur gonna need a 3.0 ghtz processor just to run a chat program


D3m0nnet.com
Re: Use more Threads in mIRC! #4170 31/12/02 11:28 PM
Joined: Dec 2002
Posts: 27
G
GTS Offline OP
Ameglian cow
OP Offline
Ameglian cow
G
Joined: Dec 2002
Posts: 27
Sorry pal, but .. i don't get your point.

Whats so bad about sitting in 40 channels?
I could sit in even more channels, if i want to ... its not like mIRC's cpu usage increases by 1% per channel or something.


proud to be baka
--> GTSdll Homepage <--
Re: Use more Threads in mIRC! #4171 01/01/03 03:09 PM
Joined: Jan 2003
Posts: 1
M
MCTuvok Offline
Mostly harmless
Offline
Mostly harmless
M
Joined: Jan 2003
Posts: 1
i think it's not the point "why" you are in x channels, but how you can improve an already good program smile

it sounds good to swap each search and other actions, that possibly could have a longer execute duration in particular threads.

Re: Use more Threads in mIRC! #4172 11/01/03 01:30 AM
Joined: Jan 2003
Posts: 4
J
Jester2 Offline
Self-satisified door
Offline
Self-satisified door
J
Joined: Jan 2003
Posts: 4
Actually a friend of mine online and I experimented using threads on mIRC, and there's sort of a duct tape solution to making a "virtual thread." It pretty much involves a timer set to execute in a minimal amount of milliseconds (say 20) as it executes whatever command(s) specified. That way, mIRC does not hang while huge lists of information are being processed.


"Huh?"
Re: Use more Threads in mIRC! #4173 24/01/03 11:06 PM
Joined: Dec 2002
Posts: 25
S
SubSpace Offline
Ameglian cow
Offline
Ameglian cow
S
Joined: Dec 2002
Posts: 25
I suppose that would work, but it's just plain ugly :tongue:

I wrote a semi-advanced chatclient of my own once, not for IRC but for Battle.net and it had to option to run a certain alias in a seperate thread.

Adding that feature was actually quite simple, and made the aliases a lot more powerful. Of course this was partly because the rest of the program was already multithreaded smile

The scripting language didn't have as many features as mIRC, but I'd like to think I did the right thing with the multithreading. Before I added timers I would actually just run an alias with an infinite loop and a sleep statement..