They also had to undergo physical and mental examinations upon entering. That was before the 1920's when things got even more restricted because they knew even then that the country could not handle mass immigrations (14.5 million in the decade).
It took the typical person 1-2 hours to be admitted after landing at Ellis Island. People with possible diseases it would take longer and could take a few weeks for some people, but for the most part it was a pretty easy process.