Senior judges have criticised how a "straightforward" family law case lasted more than 50 days and ended up costing more than £1m.
The case at Stirling Sheriff Court centred on a father's bid to regain contact with his 10-year-old son.
Sheriff Wyllie Robertson's decision to deny further contact between them was upheld.
But the Court of Session judges said the length of this case was not in the interests of the child.
The case was transferred to Stirling from the small court at Alloa because it was expected to last so long and ran to 52 days of evidence, heard between September 2008 and November 2009.
A large proportion of the estimated £1m cost of the case - not including the judge's costs - was paid by the Legal Aid Fund.
The father's attempt to regain contact was opposed by the mother, the boy's legal safeguarder and the boy himself.
Both parents were criticised by the sheriff as "argumentative and intemperate" with "domineering and determined personalities".
In their judgement, Lord President Lord Hamilton, sitting with Lords Carloway and Hardie, said they had been told that "protracted proceedings" in these types of cases was not uncommon.
"We regard this, if accurate, to be a highly unsatisfactory state of affairs," the judges said.
"Cases of this kind are often difficult but their objective must be, in the interests of the child or children, an expeditious disposal.
"The primary responsibility for achieving such a disposal lies with the parties' professional advisers, solicitors and counsel."