Experiencing Lag on the sender client side

Post here your questions about the Flash / Flex / Air API for SFS2X

Moderators: Lapo, Bax

Post Reply
Francis
Posts: 4
Joined: 05 Mar 2011, 19:14
Location: Canada

Experiencing Lag on the sender client side

Post by Francis »

Hello everyone,

Please excuse me if this is a silly question but I am rather new to smart fox server.

Here is the problem,

I have a simple X, Y grid with a character moving around, this movement information is sent to the server. I am using the ObjectMessageRequest to send information. Sending this information when there is no other client connected to the same room there is no problem. If another client connects to the room the client which is sending the information freezes for a moment with each message sent. Event if its a matter of a couple seconds between messages everything simply freezes and becomes unresponsive.

Some background info :

The server is fresh out of the box basically and I have been running some simple tests in flash. The client and the server are being run on the same pc.


It seems like the sender client just locks up until the listener client receives the message. Is this normal, is this a short coming of ObjectMessageRequest?

Should I be using ExtensionRequests?

Or is the lag a symptom of another problem?


If anyone can shed some light on this problem I'd greatly appreciate it.

Thanks everyone.
User avatar
Bax
Site Admin
Posts: 4626
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Post by Bax »

This is hardly something which is caused by SmartFoxServer. Something else is going on on the client-side. In fact the SFS API do not block the communication after sending a message and can't freeze the client.
Do you have more informations to share?
Paolo Bax
The SmartFoxServer Team
Francis
Posts: 4
Joined: 05 Mar 2011, 19:14
Location: Canada

Post by Francis »

Here is some more info,

I am running in flash builder 4, as well as using the flixel game library which is feeding the information that is sent to sfs.

Besides that the application is pretty simple, more of a functionality test before starting development. A viewstack with a series of views to moniter that various events and so on. As well as an instance of flixel, with a very basic tile based display with a character moving around.


This freeze occurs only when there is a second client connected to the same room listening. Any other case no freeze occurs. The freeze happens precisely at a send command, example :

sfs.send(new ObjectMessageRequest(dataObj));


Just to precise I am using sfs 2x.


Flixel could perhaps be causing some sort of conflict, Any idea what it could be and how it can be resolved?

If not could you possibly describe a bit what is happening when send is called. Perhaps that that shed some light on a potential problem.

sorry for the less than obvious problem, let me know if you have any light to shed on the problem.

Thanks
User avatar
Bax
Site Admin
Posts: 4626
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Post by Bax »

I'm not familiar with flixel, so I can't say if it may cause the issue.
From the client point of view, the fact that another client is connected or not is in-influent: the message is sent in the same way to the server, so it is not clear why the freeze is not occurring if no other client is connected.
Maybe you should turn on the Flash Builder's profiler and see what it reports.
Paolo Bax
The SmartFoxServer Team
Francis
Posts: 4
Joined: 05 Mar 2011, 19:14
Location: Canada

Post by Francis »

Ok thanks,

I'll see if I can track down the source of the problem.
Post Reply