Salut tout le monde
j ai un bout de code a débugger
ce code utilise beaucoup de CPU
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
 
                   For k = 0 To nRepoCount - 1
                        nSumCounter = nSumCounter + 1
                        Select Case seqRListObj(J).Item(k).classCode
                            Case TxnClassCodes.gcfLeg, TxnClassCodes.gcLeg, TxnClassCodes.specLeg
                              '  bIsRepo = True
                               On Error GoTo SkipNext3       ' the way object are retrieved for indi repo and list repo
                                daTotAmount(J) = daTotAmount(J) + seqRListObj(J).Item(k).TxnInfo.amountExpected
                                daTotQuantity(J) = daTotQuantity(J) + seqRListObj(J).Item(k).TxnInfo.quantity
                                GoTo SkipNext4
SkipNext3:
                                daTotAmount(J) = daTotAmount(J) + seqRListObj(J).Item(k).amountExpected
                                daTotQuantity(J) = daTotQuantity(J) + seqRListObj(J).Item(k).quantity
SkipNext4:
                            Case Else
                               ' bIsRepo = False
                                daTotAmount(J) = daTotAmount(J) + seqRListObj(J).Item(k).amountExpected
                                daTotQuantity(J) = daTotQuantity(J) + seqRListObj(J).Item(k).quantity
                        End Select
                        If nSumCounter > gsTxnCap Then
                          Exit For
                        End If
                   Next
je pense que le probléme est dans l'accés successif inutil pour seqRListObj(J).Item(k) (k atteind 18000)
j ai essayé de la mettre dans une variable temporaire
Dim temp=seqRListObj(J).Item(k) et l utiliser a chaque fois
mais ca ne marche pas
c'est ma 1ére expérience en VB
donc je suis hyper débutant
merci pour l aide