I had a similar issue. I suggest making it asynchronous, i.e. set a flag and have a callback mechanism to fire when the db has finished loading. How do we know when its done? maybe start by passing the number of records and check when all of them have loaded.
Doing it with a timer will never be accurate based on size of table, network conditions etc.