I have a Dictionary that will likely have overr 17,000 records in it. I need to look up and count instances based on driver anytime a new record (a lap) is added to it. I am going to then refresh my listview based on new record getting added.
As I am doing this, my processor goes up to 30%.
Is there a more efficient way to do this?
Attached is my code:
Thanks for your help in advance. I am looking for syntax help
I would expect to split the points based on participation.
Public Shared LapTimes_HT As New Dictionary(Of String, clsLapDetail)()
Public Class clsLapDetail
Public Lap As Integer
Public LapTime As Integer
Public PassingTime As Integer
Public ElapsedTime As Integer
Public LapSpeed As Decimal
Private Sub PopulateROPListview()
For Each Driver In ROPDrivers_AL
Dim DriverID As String = Driver
Dim LapCount As Integer = (From entry In LapTimes_HT _
Let key = CType(entry.Key, String) _
Let value = CType(entry.Value, clsLapDetail) _
Where key.Contains("-" & DriverID & "-") And value.LapSpeed > 190 And value.LapSpeed < 200).Count()