I have a lot of experience with this because I have developmental dysplasia of the hip and I've been researching tediously and I've also had many procedures and surgeries. Honestly just depends on the severity of the condition, but usually barring any complications it can take around 3 months before you can put weight on it. I have developmental dysplasia of the hip. I had an osteotomy earlier this year and my doctor said that I can put weight on it as tolerated but like I said before it depends on the severity of the condition.. However you should talk to your doctor and do some research on it.
In depends upon the surgery if it is a major surgery hen the recovery may be long but if its just minor then the recovery may be fast.