From an engineering perspective, multi-piece port lids allowing the guns to be stowed in the outboard position would have been a clever technical innovation. French illustrations by Antoine Roux and Jean-Jerome Baugean (who were both extremely knowledgable of seamanship) make up a major percentage of the primary references that we have of the American frigates in the early 19th century. Some of these illustrations clearly show guns run out through closed gun ports in gales.
One of the major tradeoffs in sailing ship design was stability vs. roll motion. Stability (or 'stiffness', the resistance to rolling which allowed more sail to be carried and kept the vessel from capsizing) was increased by maximizing the 'metacentric height' (the distance between the center of gravity of the ship and the center of buoyancy - the center of the volume of water displaced by the hull - a vessel with low metacentric height was 'crank' or 'tender' - the center of gravity had to be below the center of buoyancy for the ship to remain upright).
There was a practical limit to the metacentric height however, because as the roll became stiffer, the roll period (time between the opposite ends of the roll) would decrease (become 'jerky') and increase the dynamic loads on the masts and rigging. There was a danger of the masts being 'rolled out'.
Running out the guns increased the 'polar moment of intertia' and lengthened the roll period (the best example of the effect of polar moment of inertia is a spinning ice skater accelerating as she pulls her arms into her body - the period of each rotation decreases as the rate of spin increases). With guns run out, a vessel would have a slower roll, be 'safer' and more comfortable for the crew. Also, the rigid ports would provide additional security in restraining the guns (preventing loose cannons) and as been mentioned in other posts, would provide more floor space on deck.
As to the function of gunports in providing armor protection to the gun crews in combat, this concept was largely abandoned in the late 18th century. Gunports were only provided on the lower tiers of guns, where swamping in a seaway was a hazard or crew living spaces were located. Cummulatively, the gunports represented a significant mass, above the center of gravity, which raised the CG and reduced stability. Even on the lower gun tier of frigates, port lids were usually only provided below the quarterdeck (officers' quarters) and below the foc'sl (galley), guns in the waist were left uncovered.
As far as removal time is concerned, ample time was available for preparing for combat when sailing speeds averaged ~4-8 knots. The tasks of clearing furniture, partitions, lowering boats, manning and preparing magazines, etc. were far more time consuming than clearing the guns. Ships were cleared for action and then hours could pass as vessels closed, maneuvered for position or chased/ran (except in the movies where 2 minutes is a dreadfully long time).
General quarters drill is a 20th century innovation where gun and sight ranges began to converge (and something 20th century viewers of Hollywood movies could relate to). Gun crew efficiency in the late 18th and early 19th centuries (at least from American and British viewpoints) was measured by rate of fire. Rate of fire was limited by both loading time and (often overlooked) powder/ball resupply time. There was a limit on 'on deck' powder allowance as a precaution against fire/explosion, therefore rate of fire could be limited by the efficiency of the magazine 'handover' rates and traffic between decks.
It is a shame that many of the American naval records for this period were destroyed during the War of 1812. It would be interesting to see the details of these technical innovations... and how they were successfully 'sold' within an extremely conservative technical culture.