To get to a real online compilation other software such as BaKoMa TeX use a modified (La-)TeX. With the newer LuaTeX it is easier to hook deep into the internals, maybe this is a route that you can investigate.
As a workaround what can be done though is to start the compilation with LaTeX up to the point of the current cursor position in your editor. Let's say your complete document looks as follows:
\documentclass{article}
\begin{document}
$1$
\newpage
$2$
[cursor position]
Some more example text.
Instead of continuing, end input here and abort the compilation, the DVI file will still get written up to this point.
\newpage
$3$
\newpage
$4$
\end{document}
It is possible to input and compile the first block with LaTeX. Then when the user takes a short break the compilation can continue and can be aborted for example at the next page. The DVI document is then almost immediately available. In the background you can then start the compilation process up to the point of the cursor again so that it does not interrupt user workflow.
With a modified LaTeX executable the first optimization would be recording the compilation process in a kind of cache, so that the part before the current page does not need to be compiled again ever unless it changes. That makes this approach also somewhat feasible, there is no programmatic way to influence the content of a previous page with code on the later pages. This sets a LaTeX file apart from e.g. a C source file where at the end of the file previous parts can be changed.
\dumpcommand you are referring to is used to create new TeX format files. Beside the performance impact of dumping the format after each page, the\dumpcommand is only avaiable in the IniTeX version of TeX. So you'd first need to preload the LaTeX format to be able to process your document (if that will even work). – siracusa Aug 17 '19 at 04:46