fix perf issue as was opening db on ever sync line