The O.P. has indicated in a comment that inserting (redisplay t) following the switch-to-buffer call resolves the issue outlined in the question. Another idea would be to use (sit-for 0), which also forces a redisplay by the display engine. The function redisplay contains a doc-string that states:
redisplay is a built-in function in ‘C source code’.
You're looking for counsel-recentf, which comes with counsel.
Just M-x counsel-recentf or bind it to any keys you'd like and that's all you're looking for.
Loosely speaking Ivy is the completion backend, counsel provides functionality to use ivy "replacing" some popular commands with ivy-style completion.
An overlay can have property modification-hooks, which specifies particular hooks.
Buffer text or a string can have text property modification-hooks, which is similar but slightly different.
See the Elisp manual:
Node Overlay Properties
Node Special Properties
There you'll see how inhibit-modification-hooks relates to these properties.
I was able to construct a function based on the code in string-inflection.
(defconst path-characters "a-zA-Z0-9:\\\\_-")
(defun win-to-posix-posix-path ()
"Rewrites a Windows formatted path to be of POSIX style."
(let* ((start (if mark-active
Byte-compiling is a CPU-bound activity, unlike with subprocesses and network processes there is no way of doing it asynchronously in the same Emacs instance. What you can do though is launching an Emacs subprocess and making it byte-compile the file. async.el offers support for this, try async-byte-compile-file from async-bytecomp.el.