FinishDynamic[] does not wait for display to finish

Bug introduced in 10.4 or earlier and persists through V11.2

[CASE:3993499]

If your UI contains a couple of heavy/big elements, or one heavy and couple of slightly heavy, because delay accumulates and you can't capture rendering finished event.

Please run the code sample

With addition to the delay issue, the second progress indicator does not appear at all. It is because FinishDynamic[] does not seem to care about the rendering time.

So if the second procedure starts before rendering of the first is finished, it will miss the progress indicator trigger.

This example is artificial but will affect your gui if it is a little bit more complex/heavy.

Question

Is there something like FinishRendering[]? Or how to queue procedures which involve noticeable rendering?

I will wait for WRI confirmation but for me it is a because:

FinishDynamic[] does not return until all Dynamic objects are updated and displayed.

- ref/FinishDynamic

(*in case evertyhing works well or FE crash, please modify n value.*)

DynamicModule[
{ processing1=False,processing2=False}
, data=panel1=panel2={}
; n=5 10^4
; update1[]:=panel1=Graphics[Line@data,Frame->True]
; update2[]:=panel2=Graphics[Line@data,Frame->True]
; Grid[{{
Button["run me"
, processing1=True              (* trigger the first progressindicator*)
; data=RandomReal[1,{n,2}]
; Pause[.1]                     (* artificial pause to mimic a time consumig data creation. allows to clearly see progress indicator*)
; update1[]                     (* create graphics *)
; processing1=False             (* trigger the first graphics to appear *)

; FinishDynamic[]               (* wait till everything is done *)

; processing2=True              (* analogous procedure for the second plot, fails *)
; Pause[.1]
; update2[]
; processing2=False
, Method->"Queued"
, ImageSize->100 {1,1}
]
, Dynamic[
If[processing1, Dynamic@ProgressIndicator[Appearance->"Indeterminate"],panel1]
, TrackedSymbols:>{processing1}
]
, Dynamic[
If[processing2,Dynamic@ProgressIndicator[Appearance->"Indeterminate"],panel2]
, TrackedSymbols:>{processing2}
]
}}, BaseStyle->CacheGraphics->False
]
]


[CASE:3993499] was created

If FinishDynamic is not meant to handle extra rendering time, I will file a suggestion that we create a FinishRendering function to handle cases like this. [...]