Why does it take 2-4 hours to perform the colonoscopy?

It doesn't . It doesn't unless you have a specific problem.
30 minutes. Colonoscopies usually take between 15-30 minutes to complete. Facilities typically ask patients to arrive an hour early for check-in and preparation. Patients are observed for 30 minutes after the exam for a total facility time of about 2 hours.