You haven’t give us any system information but those are very disk-intensive operations so if you still have spinning rust a 5400 RPM HDD that could be causing the “freeze” as CPU wait time is not taken into account in all CPU monitors and the system is just waiting for disk I/O to finish.