perf changes for getting model by id