Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Enhancing Performance
Message
De
20/06/2014 14:32:10
 
 
À
20/06/2014 12:33:17
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows XP
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01602118
Message ID:
01602146
Vues:
90
No Sir, I Dont know about it can you please brief me about it. I will read and apply it.




>Have you used Coverage Profiler to determine how long it takes to run each line of code?
>
>
>
>>Using the following code I am updating some Data in a Cursor which has more than 5000000 Records.
>>
>>The Initial Speed is tremendous but as the number of records scanned the speed gets slow down. Kindly Guide How could I enhance the performance.
>>
>>Any alternative suggestion or Idea is also welcome.
>>
>>Here is my code
>>
>>
>>
>>Insertone=0
>>Inserttwo=0
>>lmultipage=.F.
>>
>>SCAN
>>Newpath=Newpath
>>WAIT WINDOW m.Newpath NOWAIT
>>CREATE CURSOR BillFile (POS Varchar(254))
>>APPEND FROM (m.Newpath) SDF
>>
>>SELECT Billfile
>>
>>GO Bottom
>>DO WHILE NOT BOF()
>>
>>IF LEFT(POS,8)='(Page 1)'
>>cTextone='<</Duplex false/PageSize  [595 842] /Tumble false /ManualFeed false /MediaPosition 0>>  setpagedevice'
>>Insertone=1
>>Inserttwo=0
>>ENDIF
>>
>>IF LEFT(POS,8)='(Page 3)'
>>lmultipage=.T.
>>ENDIF
>>
>>
>>IF LEFT(POS,8)='(Page 2)' 
>>Insertone=0
>>Inserttwo=1
>>
>>IF lmultipage=.T.
>>cTexttwo='<</Duplex true /PageSize [595 842]/Tumble false /ManualFeed false /MediaPosition 2>> setpagedevice'
>>ELSE
>>cTexttwo='<</Duplex false /PageSize [595 842]/Tumble false /ManualFeed false /MediaPosition 2>> setpagedevice'
>>ENDIF
>>lmultipage=.F.
>>ENDIF
>>
>>IF POS='%%BeginPageSetup' 
>>IF Insertone=1
>>INSERT Blank
>>Replace pos WITH cTextone
>>Skip-2
>>Insertone=0
>>Inserttwo=0
>>ENDIF
>>ENDIF
>>
>>IF POS='%%BeginPageSetup' 
>>IF Inserttwo=1
>>INSERT Blank
>>Replace pos WITH cTexttwo
>>Skip-2
>>Insertone=0
>>Inserttwo=0
>>ENDIF
>>ENDIF
>>
>>
>>Skip-1
>>WAIT WINDOW 'Remaining Records...'+ALLTRIM(STR(RECNO())) NOWAIT
>>ENDDO
>>
>>Set Textmerge On
>>Set Textmerge To (m.NEWPATH) Noshow
>>Scan
>>\\<< TRIM(POS) >>
>>\
>>Endscan
>>Set Textmerge To
>>Set Textmerge Off
>>SELECT New_bills
>>ENDSCAN 
>>
>>
>>
>>
>>Regards
>>Harsh
Harsh
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform