My wife had two total hip replacements this year.
In her case riding was nearly pain free before the surgery, but she had difficulty mounting and dismounting. The pain was such that we hadn't been able to hike for a few years before the surgery. She would have sudden pains that would cause her to scream when rolling over in bed. It was difficult for her to get in and out of the shower, carry heavy items, or walk up and down stairs. The weight of a normal pair of shoes would cause her hip pain when walking.
Before the first surgery the surgeon said he would allow her to ride without restrictions 3 months after surgery, but she would not be able to do our usual 50-60 mile training rides that include 5000-6000ft of climbing until 6 months after surgery. The reason for the extra 3 months was because it was anticipated that she would not be strong enough.
After the first surgery the surgeon allowed her back on the bike for limited riding about 1 month after surgery. She was not allowed to ride with cleats. At 3 months and 3 days we did one of our previously described rides.
The second surgery was 3 months and 1 week after the first.
After the second surgery the surgeon allowed her back on bike after 3 and a half weeks. At 2 months and 2 days we did one of our previously described rides, and have continued to do one every week thereafter.
I think her experience is on the extremely good side, perhaps 1 in 1000 cases or better. She was in the hospital two nights for the first surgery, and one for the second. The nurse stated she had NEVER seen a THR go home in one night. My wife would advise you to get in the best shape possible before surgery. Her hips were pain free immediately after surgery. Her recovery involved getting the muscles nearby to feel and function normally again. PT was invaluable. She still is working through muscle stiffness.