Improve app performance by managing database observer lifetime better