Thanks all for contributing! In mgcv documentation it is suggested to change smoother to bs = “cr” in case of large data sets (should produce more or less the same results as bs = “tp”). I have no strong preferences to use Bayesian estimation here, but I also have a multimembership structure in my data, so GAM with brms seems to be my only option here. I have been experimenting with a small sample (n=5000) from my original data and bs = “cr” does seem to speed up things. But I also get warning about maximum treedepth and increasing “(max_treedepth = 15)” again slows things considerably (compared to “(max_treedepth = 12)”).