DETROIT (AP) _ When the lawsuit began, Sophie and Milos Malesev's daughter was in high school. When it ended, their daughter's youngest son was in high school, and Milos had been dead for 17 years.

''I thought they were waiting for me to die,'' said Mrs. Malesev, who waited nearly 25 years to settle claims over damage her house sustained when a water tunnel was built through her neighborhood.

Large urban courts typically are backlogged, but Wayne County Circuit Court's civil system was branded as among the nation's most-stalled in 1978 and 1984 studies by the National Center for State Courts.

Now, four years into a makeover that included a new computer system and method of assigning cases to judges, the court is being hailed as a model.

''We had a lousy case-flow management system. It placed total responsibility everywhere and individual responsibility nowhere. And as you see in the collapse of the communist world, that doesn't work well,'' said Richard Kaufman, chief judge since 1986.

Judges' impatience with delays and embarrassment over the low ranking in the two studies spurred the changes.

Per-judge caseloads have been whittled from 1,900 to 1,400. Nineteen of the court's 35 judges are handling fewer than 700 cases each, and 15 of those carry fewer than 600 each.

On Jan. 1, 1986, the court had about 60,000 pending cases, of which 17,000 were ''old dogs'' - more than 2 years old. Now just are 29,000 pending, including 2,700 old dogs.

''It's certainly a major triumph,'' said Ken Pankey of the National Center for State Courts.

''Wayne County is the major success story,'' said Barry Mahoney of the Denver-based Institute for Court Management, a branch of the National Center for State Courts in Williamsburg, Va.

Mahoney is planning a workshop for managers from other courts in Detroit next year to show off what Wayne County has done.

One problem with the old system was paperwork. With more than 100 cases filed daily, it was hard for keypunch operators to keep up, said Terry Kuykendall, a deputy administrator. The first change was a new computer system and a review of existing cases.

Another help was the Michigan Supreme Court's coincidental adoption of a rule that required discovery - the pretrial gathering of information about a case - to be completed in 12 months instead of 26.

The most important change, how cases were handled, evolved after long planning sessions with judges, staff, consultants and experts from the American Bar Association and National Center. Until 1986, incoming cases were assigned to one judge for pretrial matters and transferred to another for trial.

Under the individual docket, cases are assigned to one judge from the moment they're filed. Hearings and other deadlines are scheduled automatically, and the judge retains responsibility for every phase of the case.

Kaufman picked seven judges to go on the new calendar in October 1986. It worked. Every October since, seven more judges have gone to the new system.

Judge Marianne Battani was in the first group.

She hears her own pretrial motions and sets her own trial dates. Cases that waited three years under the old system now are finished in 12 to 18 months, she said.

''I love it,'' Battani said.

However, she wonders if it will become tempting to push cases to settle out of court or transfer to another jurisdiction to get them off the books.

''I think sometimes we get bogged down with statistics,'' she said. ''I think there's an urge to handle cases quickly, because of numbers.''

Gerald Thurswell, a Detroit lawyer for 22 years, remembers how under the old system, he sometimes pleaded for an accelerated trial date for fear his client would die before the case came up. Judges rarely granted such requests.

''There were so many excuses to get a fast trial. Clients used to wait years,'' he said.

Under the new system, lawyers in his firm are handling fewer cases at one time because of the quickened pace.

''We've had to hire more attorneys,'' Thurswell said. ''They move so fast; judges are in competition with each other. It's better for the whole system.''

''It's good,'' said Chris Andreoff, another attorney. ''The advantage is you know where you'll be. The judges have more grasp because of the continuity.''

Detroit court officials now are hoping to meet, within a few years, ABA processing-time standards that call for 90 percent of all civil cases to be completed in a year, 98 percent to be cleared up within 18 months and 100 percent within two years.

Currently, no urban court meets that standard, although a few come close, said Doug Somerlot of the ABA's Lawyers Conference Task Force on the Reduction of Litigation Cost and Delay. Nationwide figures on civil delays don't exist because states use different data, making comparisons impossible, he said.

The National Center is studying whether the Wayne County project can be applied to other courts, Pankey said.

Somerlot said persistence might be the key to Wayne County's reform.

The most important thing, he said, is ''that they agreed it was a problem and worked on it.''