AW: Autoit V3 to slow? autoit2 was faster!?!

"Lüth, Carsten" <[email protected]>
Newsgroups gmane.comp.windows.autoit.user
Message-ID <[email protected]>
Hello Larry,
 
I 've just tested your AU3-script! Result: ~9 seconds
The old AU2-script without "SetBatchLines, 1000" needs ~14 seconds 
But the old AU2-script with "SetBatchLines, 1000" is still faster with ~2
seconds!!!
 
"SetBatchLines, 1000" is the accelerator, but under Autoit3 I can't use it
anymore.
 
Any Idea? What can I do to accelerate the new script?
 

Mit freundlichem Gruß / With kind regards 

Fielmann AG 

Carsten Lüth
IT - Desktop Services
Weidestraße 118a
22083 Hamburg
Telefon: +49 - (0) 40 - 2 70 76 - 199
mailto:[email protected] <mailto:[email protected]>  

-----Ursprüngliche Nachricht-----
Von: larrydalooza [mailto:[email protected]] 
Gesendet: Donnerstag, 22. Februar 2007 16:35
An: [email protected]
Betreff: Re: [AutoIt] Autoit V3 to slow? autoit2 was faster!?!



--- In AutoItList@yahoogro <mailto:AutoItList%40yahoogroups.com> ups.com,
"Lüth, Carsten" <c.lueth@...> wrote:
>
> Hello,
> 
> thx for all replys!
> 
> execution time for the same search:
> autoit version 2 = ~2 seconds! 
> autoit version 3 = ~11 seconds!
> 
> How to make Autoit 3 faster???
> 
> ;NEW Autoit-3-Script ~~~~~~~~~~~
> #include <file.au3>
> $search = InputBox("Search in TNSNAMES.ORA", "Please enter Number -
3 digits
> - you want to search:")
> $begin = TimerInit()
> $CountLines = _FileCountLines( "TNSNAMES.ORA" )
> $search = "NDL0" & $search & ".world"
> $line=0
> while $line < $CountLines
> $line = $line + 1
> $text = FileReadLine ( "TNSNAMES.ORA" , $line )
> $result = StringInStr ( $text, $search )
> if $result > 0 then exitloop
> wend
> $dif = TimerDiff($begin)
> MsgBox(0,"Time Difference",$dif)
> if $result = 0 then 
> MsgBox ( 0, "Search", "Nothing found!" )
> Else 
> MsgBox ( 0 , "Search", "NDL0xxx.world found in line " & $line )
> Endif
> ;~~~~~~~~~~~~~~~~~~~~~~

try this...

$search = InputBox("Search in TNSNAMES.ORA", "Please enter Number - 3
digits - you want To search:")

$begin = TimerInit()

$search = "NDL0" & $search & ".world"

$line = 0
While 1
$text = FileReadLine("TNSNAMES.ORA")
If @error Then ExitLoop
$line += 1
If StringInStr($text, $search) Then
$dif = TimerDiff($begin)
MsgBox(0, "Time Difference", $dif)
MsgBox(0, "Search", "NDL0xxx.world found in line " & $line)
Exit
EndIf
WEnd
MsgBox(0, "Search", "Nothing found!")



 



[Non-text portions of this message have been removed]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.