While trials don't have a set time, generally the length of a trial is based on its complexity (and to a certain degree, also the gravity of the charge). Simpler cases (e.g. breaking and entering) will generally take less time to hear than more complex cases (e.g. a violation of proper calculation procedure of an SEC mandated income report concerning transfers of capital accrued by partially owned subsidiaries).
For example, last year I was called to jury selection for a drunk driving case that was estimated to last 2 days; this year, I was called for jury selection, which took over a week before I was dismissed as a potential jury, for a murder trial that was estimated to last over a month.
However, I'm sure that OJ's celebrity did play a role in the length of his trial; if nothing else, then it would have lengthened the jury selection and voir dire process significantly.