According to Playstation 3 manual, it takes approximately 2 hours to fully charge the Playstation 3 controller when the battery has no remaining charge. [ref]Sony Dual Shock 3 Controller PS3 User Manual[ref]. This average charging time is just the same as PS4, and one hour shorter than the PS5.
You can charge your PS3 controller most effective when the temperature is between 10 °C and 30 °C (50 °F and 86 °F). It’s recommended to charge the PS3 controller at least once a year to keep it functioning properly. If you want to play when charging, no worries, because you can use your controller while charging.