Fast and efficient Bayesian semi-parametric curve-fitting and clustering in massive data