So it wasn't in any mode while it was charging. (UPSM slows the CPU, but when the phone is off, the CPU isn't running at all.) Is that what you're saying? (Having the phone turned on is "using the phone" - you don't know what apps were running in the background without running an app that would show running apps.) I think you mean that the phone was on while it was charging. If the battery is bad, that could cause slow charging.
Are you still using the original battery? Do you normally charge it to 98% (or 100%)? Do you normally discharge it to less than 30%? If yes to any of those (and more so if yes to more than one), it may be time for a new battery.