Here's my experience..
Try installing boeffla kernel and activate "ignore unstable voltage/power". [REMEMBER IT IS ONLY FOR CM ROM!]
I have the same problem too previously. My phone charges very slowly. It's like 50% for 8 hours or more..
I went to samsung service centre and they diagnosed that my motherboard need to be replaced because of some power management failure..
I declined the fix (obviously, it is so god damn expensive!) and tried installing boeffla kernel and then my phone charges normally now.
Hope that my method helps.
You could also troubleshoot using another methods..
1. Use a different charger (The line and the power socket charger). See if it improves your charge
2. Tried charging on factory-resetted rom. It might be some application that causes your phone to charge slowly
3. Use a different battery and charge (if possible)
4. Final method: Send to samsung service center and let them diagnose for you.. Might be some hardware failure.