Adding a layer with 175,000 records to ArcGIS Pro SDK using LayerFactory.Instance.CreateLayer causes the layer to draw slowly despite applying a definition query to reduce the number of features to display.
This issue is no longer reproducible.
It is recommended to set a definition query during layer creation with LayerCreationParams instead of creating a layer first and then applying a definition query.
Refer to: https://pro.arcgis.com/en/pro-app/latest/sdk/api-reference/topic26422.html
Sample code:
string webServiceLayerURL = "https://services.arcgis.com/.../FeatureServer/0";
var lyrCrtParam = new FeatureLayerCreationParams(new Uri(webServiceLayerURL))
{
DefinitionQuery = new DefinitionQuery("query1", "oa01cdold LIKE '47%'")
};
var lyr = LayerFactory.Instance.CreateLayer(lyrCrtParam, MapView.Active.Map);