Seems they understood their mistakes and learnt a lot from their first innings and as a result played well in second innings and made 359 as against 135 in first innings.
They should have calculated all these before the series started so that they could have a fighting chance

. I am not denying the fact that Sri Lanka tried to play for a longer time but they conceded a big lead as they played really bad, may be because the wicket was aiding the bowlers and once the pitch settled down the batting became easy.
If Sri Lanka had a lead over 150 runs then the match would be interesting as they picked 3 wickets already.