Lord Justice General Lord Gill was giving a ruling on behalf of seven judges asked to consider whether sections of the Criminal Procedure (Scotland) Act 1995 breached human rights.
The case had been called "a collision between two legally protected values," said Lord Gill - the right to silence and quick trials.
The issue came to the Court of Criminal Appeal after a challenge by two people due to stand trial for serious fraud this year. They claimed a Glasgow sheriff's pre-trial ruling had infringed their right to silence.
Lord Gill said: "It is notorious that over the last 20 years the average length of trials on indictment has increased substantially." He said one reason for this was the defence "putting the Crown to the proof of every piece of evidence in the case".
The judges threw out the human rights appeal. Lord Gill said there was legitimate public interest in avoiding needless expense.