Susobh,
Dynamic dialogs have been introduced to write generic code.
For example, see Reuben's zoom library on our github:
https://github.com/FourjsGenero/fgl_zoomIt sounds to me that your form with menu + folder tabs is a specific case.
Is there any reason why you don't want to use regular "static" form and multiple-dialogs (DIALOG / END DIALOG) ?
What is the added value to use dynamic dialogs in such case?
What part of your form is "dynamic"?
Can't you manage to prepare a static form, hide some pieces by default and show them when needed?
Also, while I agree that we are missing features like ON TIMER / ON IDLE in dynamic dialogs and that a workaround in better than nothing, it sounds a bit over-engineered to setup a hidden webcomponent just to get a timer event...
To achieve robustness, I tend to keep things as simple as possible, even if it's not 100% perfect for end users...
Are these automatic counters really needed?
What about adding an action that fires the queries to count, on user demand?
Check for ex
https://github.com/FourjsGenero/tool_fglsqldebug, see the "Profiling" -> "Globals statistics" option.
Seb