>> If you use async then the GUI becomes very sluggish
>> in debug, not sure what its like in release, as per
>> bug 50104.
>>
>> I am testing against an internal LDAP server which
>> contains all Sun employee info, so it is very
>> responsive.
>
>OK, that makes sense. You might want to try apply danm's patch in
>50104 with async proxies and see if it makes any difference. Either
>way, if you could comment in the bug that'd be great... because we
>really should apply pressure to get 50104 fixed, if at all possible.
>
Done.
I am curious to see how things behave in a release
build. I am gonna kick one off and see what
happens.
>> Also modified the ds so that non proxy RDF observers
>> are used for synchronous address books.
>> I do this by checking if the current thread
>> is equal to the main thread (which is the
>> UI thread):
>>
>> nsCOMPtr<nsIThread> currentThread;
>> rv = nsIThread::GetCurrent (getter_AddRefs(currentThread));
>> NS_ENSURE_SUCCESS (rv, rv);
>> nsCOMPtr<nsIThread> uiThread;
>> rv = nsIThread::GetMainThread (getter_AddRefs(uiThread));
>> NS_ENSURE_SUCCESS (rv, rv);
>>
>> nsCOMPtr<nsISupportsArray> observers;
>> if (currentThread == uiThread)
>> {
>> }
>> else
>> {
>> }
>>
>> I presume this will be OK in the future.
>> i.e. the ui thread will always be the main
>> thread...
>
>That seems pretty likely to me, though I'm not entirely sure how we could
>verify that assumption. Maybe ask in .xpcom and/or .xpfe?
>
Ok.
One thing i pointed out in bug 50104 is the fact that
asynchronous RDF datasources may be tied to the UI
thread for notification. Observers other than XUL
may not care that the notifications occur on a
different thread. Thus the address directory datasource
aan the js LDAP datasource are in some sense bound to
the UI thread.
If it was up to the XUL Observers to decide how to
process the events then there may be scope for
optimization, via the choice of a special event
queue and proxying of i.e. move the responsibility
away from the datasource.
Thanks,
Paul.
| ? + ? = To question
----------------\
Paul Sandoz
x19219
+353-1-8199219