I am writing an admin application for a website I've written. It's a basic database update/insert/delete app. I started by using the website's server, but the time it took to connect to the server (since the main JTable is populated from the db, you have to wait for the connection) was making the application *seem* extremely slow, so to rectify the problem, I copied the database into a local SQLite database.
That improved the perceived speed of the application immensely. Now I have to synchronize the local SQLite db with the online MySQL database. At the moment, every time a change is made, I start a separate update thread for the online db and the local db. Was just wondering if there is a better way to do it?
Also, in SQLite is it necessary (better practice or w/e) to reopen and close the connection each time you use it? I tend to keep the connection open, and pass it to the classes that need it, since the db is accessed quite often.
Thanks for any pointers :)