H:Program FilesSoftQuadHoTMetaL PRO 5gifstesta5v4.htm
It was the best of times and it was the worst of
times.
I've been an alpha software user since 94, and some times I feel like I'm
just
getting started.
I saw John's post about the speed differance between the old code of a5v1
and the new code for a5v4 Will with more to do than I have time I just toke
some time to explore and this is what I found.
I was told by one of my competers that is app based on Fox Pro will do this
to 85,000 records in 148 seconds. So really its not just a test its a thing of
pride.
My test system has a AMD 500 with 256 Ram, a 6.4 gig 5400 rpm drive and
DMA33 controller.
With 90,0015 records in a table with 145 fields.
The scripts are posted below all they do is fetch thought the table changing
the value in one field
then fetch the next until it reaches the end of the table.
All values are in seconds
A5v4 Build 230
oldcode 140,139,152,142
newcode 241,218,218,217 without file_rw_exclusive,statusbar on
newcode 248,225,226,227 with file_rw_exclusive,statusbar on
A5v4.5 Build 263
oldcode 184,184,213
newcode 212,215,212,217 without file_rw_exclusive,statusbar on
newcode 224,225,226,247 with file_rw_exclusive,statusbar on
A5v5 Build 244
oldcode 171,237,218,219
newcode 319,306,without file_rw_exclusive,statusbar on
newcode 224,223,without file_rw_exclusive,statusbar off
Will A5v5 does have an excuss for it's performance it's still in beta. I
read somewhere on the board that all they have to do is tweek the dll's
''XBasic
DIM COUNT AS N
dim name as c
COUNT = 0
'rem open invoices detail
NAME = :a5.get_path()+"rainbow.dbf"
db7 = db_use(NAME)
'ih7 = INDEX_PRIMARY_PUT()
'INVRECS = DB_RECORDS_GET(db7)
t1 = toseconds(time())
batch_begin(db7)
fetch_first(db7)
while .not. fetch_eof(db7)
change_begin(db7)
rainbow->bill_city="Mrtile"
change_end(db7, .t.)
fetch_next(db7)
end while
batch_end(db7)
t2 = toseconds(time())
db_close(db7)
ui_msg_box("Program A BATCH","Seconds elapsed:"+STR(t2-t1))
NewCode
''XBasic
'rem Program B new syntax
dim count as n
count =0
'Top:
DIM iterations AS N
dim tb7 as p
dim total_records as n
tb7 = table.open(:a5.get_path()+"rainbow.dbf")
ib7 = tb7.index_primary_put()
'total_records = tb7.records_get()
'iterations = 0
t1 = toseconds(time())
'rem batch testin
tb7.batch_begin()
tb7.fetch_first()
while .not. tb7.fetch_eof()
tb7.change_begin()
tb7.bill_city="MyWork"
tb7.change_end(.t.)
tb7.fetch_next()
'iterations = iterations + 1
'statusbar.percent(iterations,total_records)
end while
'statusbar.clear()
tb7.batch_end()
t2 = toseconds(time())
tb7.close()
ui_msg_box("Program A BATCH","Seconds elapsed:"+STR(t2-t1))
'trace.writeln("Program B BATCH - Seconds elapsed:"+STR(t2-t1))
'count=count+1
'if count
'goto top
'else
'end if
END
Comment