I have heard from various sources that the amount of time the poor souls remain in Purgatory can be measured in centuries, or even longer. This is because the poor souls no longer have access to the various means of making atonement for sins which we can perform here on Earth. They can no longer fast, or put money in the poorbox at church, or pray the rosary, etc. Most importantly perhaps, they can no longer perform works of mercy… they can no longer feed the hungry, clothe the naked, visit the sick and imprisoned. As a result, it takes an agonizingly long time for them to accomplish their purification - unless we pray for them and earn indulgences for them.
This is why it’s so important for us to perform acts of penance, and works of mercy, while we are still here on Earth. If we wait until our deathbed to have a conversion of heart, we will have a long time to pay the price.