The remedy for undue delay before trial was the subject of Williams v R  NZSC 41.
As would be expected, the Court applied dicta in Attorney-General's Reference (No 2 of 2001)  2 AC 71 at para 24, and Elaheebocus v The State of Mauritius  UKPC 7 (noted here 2 March 2009).
"Undue" delay means unjustifiable (para 12), and
" ... there is no obligation on any accused to progress matters towards trial, or to protest about delay; the obligation is on the prosecution to ensure trial without undue delay. Whether delay is attributable to the Courts or to the prosecution is irrelevant to the determination of the question of excessive delay, but may be relevant in assessing the validity of any explanation for the delay and (if necessary) what remedy should be granted."
The Court observed that the right to a fair trial and the right to a trial without undue delay are distinct rights but they can overlap. There may be undue delay, requiring a remedy, even though the delay did not affect trial fairness. Therefore, a stay of proceedings is not the automatic remedy for undue delay. It is not even a usual remedy (para 18):
"Staying the proceedings is likely to be the correct remedy only if the delay has been egregious, or there has been prosecutorial misconduct or a sanction is required against a prosecutor who does not proceed promptly to trial after being directed by a Court to do so. If an accused is convicted after being on bail pending trial, a reduction in the term of imprisonment is likely to be the appropriate remedy. If the accused has been in custody, that time will count towards service of the term of imprisonment. In an extreme case, [Footnote: As for example in Darmalingum v The State  1 WLR 2303 (PC)] the conviction may be set aside. Upon acquittal, monetary compensation may be justified.
The seriousness of the offending will usually not be relevant to the nature of the remedy. If however the offending is well towards the lower end of the scale, that may be sufficient to tip the balance in favour of a stay."
Obviously, where delay (or anything else) leads to an unfair trial a stay (or on appeal the quashing of a conviction) would be necessary.
In Williams the reduction of sentence was the appropriate remedy for the undue delay.