Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Incredible performance degration behaviour
Message
De
13/01/2005 14:50:03
Walter Meester
HoogkarspelPays-Bas
 
 
À
13/01/2005 14:06:22
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 8 SP1
Divers
Thread ID:
00976753
Message ID:
00976905
Vues:
34
Fabio,

I've tested this in VFP6 to VFP9 and the general conclusion is that from VFP6 on, each version seemed to get slower. I even ran a test on FPW 2.6. It was certainly slower in two tables but a hell lot faster with 100 tables.

Also, from my tests, it seems that using an ID in stead of the alias is about twice as fast in VFP8 and even quicker in VFP7.

Walter,


>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform