Modify

Opened 14 years ago

Closed 14 years ago

Last modified 13 years ago

#2097 closed Bug (No Bug)

Performance problem with acces to object (Excel object)

Reported by: michal.orsag@… 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)

timeFile_3361.txt (2.3 KB ) - added by anonymous 14 years ago.
timeFile_3380.txt (2.3 KB ) - added by anonymous 14 years ago.

Download all attachments as: .zip

Change History (8)

by anonymous, 14 years ago

Attachment: timeFile_3361.txt added

by anonymous, 14 years ago

Attachment: timeFile_3380.txt added

comment:1 by trancexx, 14 years ago

Resolution: No Bug
Status: newclosed

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.

in reply to:  1 comment:2 by michal.orsag@…, 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 J-Paul Mesnage, 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 anonymous, 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 anonymous, 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 tpek, 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/

Modify Ticket

Action
as closed The ticket will remain with no owner.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.