# Context
We use `GraphicsOverlay` with a lot of graphic items (~10k).
# Issue
When the `MapView` is destroyed right after the graphic items are added (e.g. within 5-10 secs) the `MapView` disposes for 2-5 seconds, which causes ANR . Instead if we wait for 5-10 secs right after adding the graphics and only then try to destroy `MapView`, dispose takes milliseconds and everything works fine.
# Details
As far as we understand
this.getGraphicsOverlays().clear();takes too much time if being called right after graphics are added to the `GraphicsOverlay`
The issue is also seen in the LogCat (here are the logs for the Activity onStop/onStart lifecycle): TextureView disposing takes 15 secs
I want to emphasise once more what is weird: if we wait for 5-10 secs right after adding the items and before destroying the view, disposing works normally.
important note: the problems exists only if
renderingMode = GraphicsRenderingMode.Dynamicwith `Static` rendering mode dispose works good
We also see a very similar issue with the `FeatureCollectionLayer`, but now the disposable choke point is `setMap(null)`