I'm using RB with the latest build of Valentina to manage a single file database system. Since the index can become corrupted (especially during development!), I've added a function to the application that allows the user to rebuild the indexes.
While the indexes are being rebuilt (simply by turning indexing off and then on), I put up a dialog box with the turning barber pole and the instructions "press Command-. to stop". As I loop through the indexed fields I check for the Command-. keypress and leave the loop if it is detected.
This works OK for small databases, but when the db gets large (in this case 4000 records), there is one field that indexes extremely slowly (takes 30-45 seconds on a beige G3). While this happens, the barber pole doesn't turn and keypresses aren't detected. Not good. So...
1. Is there a way to make Valentina yield time (or at least yield time to the app using it)?
2. If I put this routine in an RB thread, will Valentina behave accordingly?
3. Would it be possible to update this large index incrementally?
I think the answers to these three are all "no", but I thought I'd ask. Any other advice would be appreciated.
Jon ©2001 jda |