With CYA 40, the recommended shock level is 16, so you're in the right ballpark there.
pool-school/chlorine_cya_chart_shock
Yes it can take a while. As long as you are losing FC overnight, or you see CC over 0.5, then there is still crud in the water to kill off with chlorine.
What kind of...