Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Incredible performance degration behaviour
Message
From
13/01/2005 14:06:22
 
 
To
13/01/2005 10:01:35
Walter Meester
HoogkarspelNetherlands
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 8 SP1
Miscellaneous
Thread ID:
00976753
Message ID:
00976883
Views:
28
Hi Walter,

But the more strange thing is this:
this degradation happen with direct WA id also,
and it is not correlated with the relative positions,
only WACount is important.
CLEAR ALL
CLEAR
SET TALK OFF
SET NULL ON
? "2 tables"
? "---------"
FOR nT = 51 TO 52
	SELECT 0
	CREATE CURSOR ("Res"+ALLTRIM(STR(nT))) (C C(1))
	APPEND BLANK
ENDFOR
? "with alias"
TestPerf('Res51','Res52')
? "with id"
TestPerf(SELECT('Res51'),SELECT('Res52'))
?
? "100 tables"
? "---------"

CLEAR ALL
FOR nT = 1 TO 100
	SELECT 0
	CREATE CURSOR ("Res"+ALLTRIM(STR(nT))) (C C(1))
	APPEND BLANK
ENDFOR
? "with first to next alias"
TestPerf('Res1','Res2')
? "with first to next id"
TestPerf(SELECT('Res1'),SELECT('Res2'))
? "with first to last id"
TestPerf(SELECT('Res1'),SELECT('Res100'))
? "with last to first id"
TestPerf(SELECT('Res100'),SELECT('Res1'))

FUNCTION TestPerf(w1,w2)

nSec= SECONDS()

FOR nT = 1 TO 100000
	SELECT (m.w1)
	SELECT (m.w1)
ENDFOR

? "200.000 workarea changes on the active", SECONDS() - nSec at 40

nSec= SECONDS()

FOR nT = 1 TO 100000
	SELECT (m.w2)
	SELECT (m.w1)
ENDFOR

?? "on another" at 60, SECONDS() - nSec at 80

nSec= SECONDS()

SELECT (m.w1)
FOR nT = 1 TO 100000
	REPLACE C WITH "X" IN (m.w1)
ENDFOR

? "100.000 replacements in current workarea", SECONDS() - nSec at 40

nSec= SECONDS()

SELECT (m.w1)
FOR nT = 1 TO 100000
	REPLACE C WITH "X" IN (m.w2)
ENDFOR

?? "on another" at 60, SECONDS() - nSec at 80

SELECT (m.w1)
INDEX ON C TAG C
SELECT (m.w2)
INDEX ON C TAG C

nSec= SECONDS()

SELECT (m.w1)
FOR nT = 1 TO 100000
	SEEK "X" IN (m.w1)
ENDFOR

? "100.000 seeks in current workarea", SECONDS() - nSec at 40

nSec= SECONDS()

SELECT (m.w1)
FOR nT = 1 TO 100000
	SEEK "X" IN (m.w2)
ENDFOR

?? "on another" at 60, SECONDS() - nSec at 80

nSec= SECONDS()

SELECT (m.w1)
FOR nT = 1 TO 100000
	GO 1 IN (m.w1)
ENDFOR

? "100.000 Go's in current workarea", SECONDS() - nSec at 40

nSec= SECONDS()

SELECT (m.w1)
FOR nT = 1 TO 100000
	GO 1 IN (m.w2)
ENDFOR

?? "on another" at 60, SECONDS() - nSec at 80
Comment ? Try with 32000 !

The dogma:
If a developer open 100 workareas is not VFP slow,
but the developer is incapable, surely .
We can do anything with max 10 workareas !

Fabio
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform