If the user will choose very frequently (and you want the fastest UX), and the choices in the database don't change very frequently: It might be worth experimenting with caching the choices in memory. For auto-complete I imagine something like a trie, or whatever the latest hotness might be.
The memory use might be too much to accept. But if the choices have enough redundancy, the size of the trie might not be awful. The cache can get stale. How much this matters, depends on your app and the data. Refreshing every N minutes might be fine? If it's not fine, and if you're using postgresql, the db lib's postgresql-connect accepts a notification-handler. -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.