What about the actual cost of filing for divorce..
I can't speak about the cost since I got divorced in 1983 so I gather prices changed since then.
As for the process itself. It all depends on the circumstances. Usually, the first court meeting is an attempt of reconciliation, or rather making sure the two parties really know what they are doing. That's just a formality though in most cases, as I assume most people who file for divorce don't do it just for kicks.
After that the judge will hear if both parties still want the divorce. If they do, the case can be settled right there right then. My divorce took two sessions, and the second session settled it. There is a waiting period of 30 days, if I remember well. That time is meant to allow for any possible details and or claims that did not transpire during the last session. If neither party makes further claims, nor presents and additional information which could potentially change the final outcome of the divorce conditions (mainly financial or custodial) then this is it. In my case, we filed on Oct 1st. and by Dec 6th we were friends again.
However, if the financial situation is complex, or if there is a custody battle (kids) and if the parties appear to have a hard time to agree on the conditions then it can drag for months, rarely years.