Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Why Processing Performance is Not Increasing ?
Message
De
15/02/2014 05:40:13
 
 
À
15/02/2014 05:24:15
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 8
Network:
Windows XP
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01594373
Message ID:
01594380
Vues:
48
>>What is the thing that might be hindering my performance. and how can I improve it. Please provide appropriate solution.
>
>
>VFP is not a good tool for parallel processing.
>
>What is your algorithm doing? Scanning a directory and feeding the DLL files? Or more?
>
>Did you try using multiple DLL copies?

No Sir, That day told me to do so, but I was wondering how it will be done. I will create multiple copy of my DLL like ps2pdf-2.dll, ps2pdf-3.dll but What is to be done next. Here is my example Can you please Exemplify me.


Local loMyObject
loMyObject = CreateObject("MyObject")
loMyObject.Mainprocess()
Return

DEFINE CLASS MyObject AS Custom
PROCEDURE Mainprocess
Local Parallel as Parallel
Parallel = NewObject("Parallel", "ParallelFox.vcx")
Parallel.SetWorkerCount(Parallel.CPUCount)
Parallel.StartWorkers()

SCAN
iFilename=ALLTRIM(Fullpath)
oFilename=ALLTRIM(Newpath)
RCNON=Recno()
Parallel.CallMethod("ps2pdf", This.Class, This.ClassLibrary,,,iFilename,oFilename,RCNON)
ENDSCAN
ENDPROC

** Convert ps files to PDF Using ps2PDF.Dll
PROCEDURE ps2PDF
PARAMETERS iFilename,oFilename,RCNON
DECLARE INTEGER _apCreate@0 IN ps2pdf.dll AS apCreate
DECLARE _apClose@4 IN ps2pdf.dll AS apClose INTEGER id
DECLARE INTEGER _apConvert@4 IN ps2pdf.dll AS apConvert INTEGER id
DECLARE INTEGER _apSetFunc@24 IN ps2pdf.dll AS apSetFunc INTEGER id, INTEGER code, INTEGER nOptVal1, INTEGER nOptVal2, STRING pOptVal1, STRING pOptVal2
DECLARE INTEGER _apGetFunc@24 IN ps2pdf.dll AS apGetFunc INTEGER id, INTEGER code, INTEGER nOptVal1, INTEGER nOptVal2, STRING pOptVal1, STRING pOptVal2
#define AP_Set_Output 3000
#define AP_Set_Input 3001
id=apCreate()
IF (id # 0)
apSetFunc(id, AP_Set_Input , 0, 0,iFilename, 0) &&input file.
apSetFunc(id, AP_Set_Output, 0, 0,oFilename, 0) &&output format and file.
apConvert(id)
apClose(id)
Sys(2335, 1) && disable unattended mode, allow UI
WAIT WINDOW 'Converting to PDF..'+ALLTRIM(STR(RCNON)) NOWAIT
ENDIF
ENDPROC







Harsh
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform