From: Florian G\. P. <fg...@ph...> - 2003-05-06 23:26:25
|
Hi sorry to reply to my own message - but after thinking a bit, I came to the conclusion that there might be a noticeable performance penality for a lot of very fast selects (or inserts, but I guess selects are much faster than inserts in general). This is due to the fact that the pseudo-asynchronous functions always activate the scheduler at least once (when doing rb_thread_select), and I guess this means that they have to wait for other threads to do their work (if there are non-blocked other threads) before they can continue. This might be what a user wants (if the other threads maintain a gui, this is most certainly what the user wants), but in some cases one might prefer the "traditional" behaviour. So, maybe the most elegant way is to introduct a parameter to the query-executing functions which lets the user decide what behaviour he prefers. I would still suggest to make the pseudo-asynchronous behaviour the default, since in most cases it won't have noticeable disadvantages, but very noticeable advantages. Greetings, Florian Pflug |