Look up Long Exposure Noise Reduction in your camera's manual. Depending on the model, you may or may not be able to continue taking photos. Some models do the processing immediately after the exposure. Some allow you to continue to take exposures, and then do the processing.
This feature uses dark frame subtraction. The idea being that if you expose a dark frame for the same length of time, then you can subtract away all the static noise.
It also makes sense as to why the camera spends as long processing after the shot as the initial exposure. If I made a 30 second exposure, it spends another 30 seconds so it can find the noise in a 30 second exposure.
I have a Canon 1D IV, and I ran into this last fall when I started to take photos of star trails.
I tried playing around with this. The buffer count goes down with each image I take before allowing the processing part to complete.
If I take a sequence of several shots with the same exposure time, at the end, the processing time is equal to that exposure time. So if I'm taking two 30 second shots, I have about 30 seconds processing at the end.
If I vary the exposure time, the processing time is equal to the sum of the times. So if I take a 15 second shot followed by a 30 second shot, I have about 45 seconds processing at the end.
My conjecture to this is that if I take a series with the same exposure time, the camera is really only doing one dark frame, and then re-using that information. If I take a series with different exposure times, the camera does indeed take multiple dark frames. This makes a lot more sense to me.