I think this is done server side, although I believe the current implementation is very slow. I imagine we should do this after the schema change.