#2097 closed Bug (No Bug)
Performance problem with acces to object (Excel object)
| Reported by: | Owned by: | ||
|---|---|---|---|
| Milestone: | Component: | AutoIt | |
| Version: | 3.3.8.0 | Severity: | None |
| Keywords: | Cc: |
Description
There is performance problem with access into Excel object in AutoIT version 3.3.8.0 compared with version 3.3.6.1. Especially if code is compiled with default setting in 3.3.8.0 and in 3.3.6.1 (3.3.8.0 is slower)
Prepare Excel into c:\excelTest.xls, fill column A with 'a', column B with '1' at least on 100 rows, save Excel. try to run or compile code and run in 3.3.6.1 and in 3.3.8.0 and see the differencies. Tried on MS Excel 2003 and 2007, same result
Code:
_Main()
Func _Main()
Local $a = 1, $b = 0
Local $start, $end, $total = 0
Local $timeFile, $timeFilePath = 'c:\timeFile.txt'
Local $oExcel = ObjGet('c:\excelTest.xls')
$timeFile = FileOpen($timeFilePath, 2)
While $oExcel.worksheets("List1").cells($a, 1).text <> ""
$start = TimerInit()
$b += $oExcel.worksheets("List1").cells($a, 2).text
$end = TimerDiff($start)
$total += $end
FileWrite($timeFile, "Time=" & $end & @CRLF)
$a += 1
WEnd
FileWrite($timeFile, "TotalTime=" & $total)
FileClose($timeFile)
EndFunc ;_Main
Attachments (2)
Change History (8)
by , 14 years ago
| Attachment: | timeFile_3361.txt added |
|---|
by , 14 years ago
| Attachment: | timeFile_3380.txt added |
|---|
follow-up: 2 comment:1 by , 14 years ago
| Resolution: | → No Bug |
|---|---|
| Status: | new → closed |
comment:2 by , 14 years ago
Replying to trancexx:
Versions before 3.3.8.0 were broken. Don't compare speed of broken thing with a speed of non-broken thing. The result you get when you do that is not valid.
So you think that it is correct, that in newest version (3.3.8.0) is access to Excel via COM much more slower (10 ms) than in previous version (3.3.6.1), where the access speed was about 1 ms?
comment:3 by , 14 years ago
I think this ticket must be analyse carefully as Michal is right when he say the results are the same under 3.3.6.1 and 3.3.8.0 just the speed differ.
comment:4 by , 14 years ago
Sorry ma English is not so good. Result is, that access Excel object via COM interface is much slower in 3.3.8.0 than in 3.3.6.1
Maybe there is relationship with bug http://www.autoitscript.com/trac/autoit/ticket/2002
comment:5 by , 14 years ago
I moved back to 3.3.6.1 due to the fact that all scripts with access to Excel via COM are very very slow.
comment:6 by , 13 years ago
But. Now version 3.3.8.1 is not broken and is "stable". Problem still exist and this few miliseconds have very significant meaning. In thousands operations it causes big differences and I am very worried because of this.
http://www.autoitscript.com/forum/topic/144510-excel-read-speed-differences-between-autoit-versions/

Versions before 3.3.8.0 were broken. Don't compare speed of broken thing with a speed of non-broken thing. The result you get when you do that is not valid.