I would approach this a few ways:
First, you'll want to identify if the problem reproduces in vanilla (i.e. non-configured, no Prelude) Emacs, or with your configurations. As Drew mentioned above, use
emacs -Q to launch Emacs without any extra
init.el configuration. If it does not reproduce here, then you're looking for a problem with a package or custom code you load in your configuration.
Second, if there is an actual error happening that you're then canceling with
C-g, you can enable debugging with
M-x toggle-debug-on-error. If it gives you a stack trace when it next hangs, you can use it to identify the cause.
Third, if it's not an error, it might just be really slow and need to be profiled. Use
M-x profiler-start, probably choose just the CPU report, reproduce your problem, and then use
M-x profiler-report. Your hang is probably occurring in the code path using the most CPU. Here is the Emacs documentation on profiling.
Fourth, and this is the longest shot, you could try compiling from the
emacs-25 branch instead of the
emacs-25.1 tag. This is something I would probably try, but is not very likely to solve your issue. However, if the bug is within Emacs, knowing that it reproduces on the latest code is useful. If you become certain the bug was introduced by changes to the Emacs source code, and you know a version where it did not reproduce, you can use
git bisect and recompile a few times to identify the problem commit. I do not recommend this unless you are 95 percent confident it's a bug in Emacs without any configurations (