Opened on Jan 12, 2012 at 3:08:13 PM
Closed on Jan 18, 2012 at 6:11:06 PM
Last modified on Sep 27, 2012 at 3:17:43 PM
#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 , on Jan 12, 2012 at 3:31:14 PM
| Attachment: | timeFile_3361.txt added |
|---|
by , on Jan 12, 2012 at 3:31:28 PM
| Attachment: | timeFile_3380.txt added |
|---|
follow-up: 2 comment:1 by , on Jan 18, 2012 at 6:11:06 PM
| Resolution: | → No Bug |
|---|---|
| Status: | new → closed |
comment:2 by , on Jan 19, 2012 at 10:23:51 AM
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 , on Jan 19, 2012 at 12:15:18 PM
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 , on Jan 19, 2012 at 12:53:45 PM
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 , on Feb 10, 2012 at 10:46:59 PM
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 , on Sep 27, 2012 at 3:17:43 PM
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.