ArcGIS Pro 2.6 and Python 3.6
I am creating a custom Map Series and have hit a bit of a roadblock. I originally was writing all data to a local FGDB, but I'm looking for ways to improve performance.
I switched to using `memory` as this appeared to be a viable option. However, I cannot update the source of the layers inside the map document (.aprx). I have been able to do this successfully with local files (not using the Python CIM), but I am stumped trying to do it with memory objects. Is it even possible?
Here is the layer as it currently exists in my map:

And here is what I'm trying (though I have tried a few things with no luck).
lyrCIM = l.getDefinition("V2")
dc = lyrCIM.featureTable.dataConnection
dc.workspaceFactory = "InMemoryDB"
dc.datasetType = "esriDTAny"
dc.workspaceConnectionString = r"memory//" + l.name
Edit:
Well, maybe it is working?
