Looking for performance
Looking for performance
- Subject: Looking for performance
- From: kubernan <email@hidden>
- Date: Thu, 31 Oct 2002 21:58:46 +0100
Hello,
I'm in tests with my client/server application.
I have a big problem of low performance with the GUI that sends
requests to the server using DO.
The design is :
1- Client GUI --> sends request using DO to the server. There is a
sync. response if the request contains errors.
2- While the server is working on the client request (in a thread) it
sends real time information to the client.
The performance problem is :
3- If the client sends a wrong request WHILE the first request is
always in work in the server (in a thread), the sync. response returns
after a long time.
In detailed :
The GUI sends a request to the server. The server runs this request
in detached thread.
If a client request is wrong, the server returns synchronously a
NSMutableArray that
describes the error of the client request. If all is ok, then the
server thread is launched.
Exemple of client request :
NSMutableDictionary *errors = [NSMutableDictionary
dictionaryWithDictionary:[serverProxy doThat:aDict]];
if ([errors count] > 0) // if the call returns errors
{
NSEnumerator *enumerator;
id key;
enumerator = [errors keyEnumerator];
while (key = [enumerator nextObject]) // read all errors in the
returned dictionary
{
int return_code;
return_code = NSRunAlertPanel(@"GUI Stress Test", [errors
objectForKey:key], @"Ok",nil,nil);
}
}
else
[informationText setStringValue:@"The server is working on your
request"];
While the server thread is working it sends informations to the client
that
updates its GUI with these informations. Using (in the server) :
[(NSDistantObject *)clientProxy setProtocolForProxy:
@protocol(clientProtocol)];
// blabla
[tempProxy serverToClientInformation:aMutableDictOfInformation];
The big performance problem is coming when i try to launch
a new request (simulating a wrong request) to the server even if the
first one is always
up. The GUI is waiting for the synchronous server response, and it comes
after a long time; about one minute !
Following the server and client code in the debugger i can't see where
there is a lock.
The response seems disappear somewhere between the server and the
client.
I tried to add some locks in my code, i tried to avoid the synchronous
reply from the server
but there is always the same problem.
Can you help me ?
Thx.
K.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.