I have utilized a ProWindow which shows road names and route numbers for selected county and road type

Altogether I need to read about 350K - 400K rows ( all feature counts local, state, etc. ). I tried a few different strategies to load them faster.
The best way I found: I created dictionaries for each feature class ( local, state, highways ..) which are filled from reading attribute tables after initialization of the ProWindow. Whenever a user selects a feature class and county that dictionary filtered and transferred to ListView items source. However, initialization takes more than a minute
public Dictionary<string, string[]> GenerateRoadDict
(FeatureLayer RoadLayer, Dictionary<string, string[]> RoadDict)
{
using (ArcGIS.Core.Data.Table RoadFLayerTable = RoadLayer.GetTable())
{
using (RowCursor rowCursor = RoadFLayerTable.Search())
{
while (rowCursor.MoveNext())
{
using (ArcGIS.Core.Data.Row row = rowCursor.Current)
{
string[] dictValue = { row["RD_NAME"].ToString(), row["ROUTE"].ToString(), row["CO_NAME"].ToString() };
RoadDict[row["OBJECTID"].ToString()] = dictValue;
};
}
}
}
return RoadDict;
}
public void LoadRoadsForSelectedCounty()
{
RoadItemsObsColl = new ObservableCollection<RoadItems>();
Dictionary<Dictionary<string,string[]>, bool> DictAndBoolDict = new Dictionary<Dictionary<string, string[]>, bool>
{
{ LocalRoadsDict, LocalRChecked },
{ StateRoadsDict, StateRChecked },
{ HighwaysDict, HighwaysChecked },
{ InterstateDict, InterstateChecked },
{ ParkwaysDict, ParkwaysChecked }
};
foreach (KeyValuePair<Dictionary<string, string[]>, bool> kvp in DictAndBoolDict)
{
if (kvp.Value)
{
foreach (KeyValuePair<string, string []> kvpRoad in kvp.Key)
{
if (kvpRoad.Value[2] == SelectedCounty)
{
RoadItemsObsColl.Add(new RoadItems { roadItem = kvpRoad.Value[0], routeItem = kvpRoad.Value[1] });
}
}
}
}
}
As a note I don't like to use table content
Would there be better way?
I could not figure how to convert ObjectID to long and use it as string as the dictionary key. If I use long would I get better performance?