Causes of leg length discrepancy in my experience includes many factors.
The most common cause of unplanned leg lengthening following hip replacement is that the femoral implant used is too long. As well as making feeling unbalanced this will put strain on the soft tissues surrounding the joint.
In cases of unplanned shortening of the limb there is no additional strain on the soft tissues and I have adjusted well with shoe lifts.
If the femoral head has collapsed priory to surgery the muscles surrounding it adapt. They become shorter. When the hip is replaced the leg length will be longer but the shorter muscles will pull the pelvis down and the patient will experience the leg as too long. It takes time for the muscles to adapt. This is the usual case.
In some cases the problem is caused by the positioning of the cup part of the joint.
It is estimated that 72% of all hip replacement patients will experience some lengthening on the operated side but the difference will be less than 10 mm. Such a small difference won't usually cause a problem as the surrounding soft tissues are not being significantly stretched. There may be some small effect on the spine but again not enough to be problematic.
X-rays are useful in leg length descrepiencies , but not infallible . A physical therapist has many ways to show leg length differences.
See you tube for demonstration.