mIRC Home    About    Download    Register    News    Help

Print Thread
#67780 14/01/04 07:55 AM
Joined: Oct 2003
Posts: 37
B
Ameglian cow
OP Offline
Ameglian cow
B
Joined: Oct 2003
Posts: 37
Why would this:

Code:
 
alias updatesearchhistory {
  var %i = 1
  var %numtok = $numtok(%MTsearchhistory,58)
  while (%i <= %numtok) {
    did Autoget 5,203 $gettok(%MTsearchhistory,%i,58)
    inc %i
  }
}
 


take .3 seconds, when this:

Code:
 
 didtok Autoget 5,203 58 %MTsearchhistory
 


takes almost a FULL 2 SECONDS...

Code:

; From the variables page
%MTsearchhistory super mega blah:super blah:blah:brand new:metallica:monsters of rock:alana barinas:david bowie:korn:industrial war:in flames:fear factory:andrew wk:american hi fi:faces game over:bleed on stage:cold cold:2002:lynyrd skynyrd:my immortal:yes:aphex twin:afx:hed pe:billy idol:beastie boys:banshee:bang tango:bad good refug:bad english

; From the dialog definition
combo 5, 186 40 800 100, hide edit drop
combo 203, 60 40 200 100, edit drop hide

 



-eMpTy

#67781 14/01/04 09:32 AM
Joined: Dec 2002
Posts: 1,922
O
Hoopy frood
Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,922
On my 300MHz box, the loop took around 10ms (0.01),
while the /didtok was ten times faster and added everything
in less than 1ms (0.001).

I'm using Win98. Maybe it's your XP/whatever theme that causes
so much useless processing.

The command I used was:

//var %i = $ticks | didtok -a Autoget 5,203 58 %MTsearchhistory | echo Took: $calc($ticks - %i) ms


Link Copied to Clipboard