Page 1 of 1

Optimizing Arrowchat

PostPosted: 08 May 2011, 14:55
by tfe
I want to optimize Arrowchat so that it doesn't makes unnecessary MySQL queries and uses proper indexes.

In my standalone installation MySQL "explain" shows that query function getFriendsList is "using temporary" and "using filesort". This is very bad becaue causes high server load. First of all I am going to optimize this query and suggest other users to do so if this query doesn't use indexes.

I have a few questions regarding other queries. I hope that somebody can answer so that I don't need to spend days learning how Arrowchat works.

In my configuration Heart Beat is set to 5 sec. What are the queries that are being executed every 5 seconds?

How often are being executed the query in function getFriendsList (how often refreshes the friends list)?

What about Banlist? I don't need it at all. Does script checks this table before sending each message to the chat?

How often are sent queries to arrowchat_trayicons table? On page refresh?

Where Arrowchat stores the number of new messages? It just counts unread messages in arrowchat table?

How often user status is being updated? It's not very important for me to show that user is typing. I would like to remove this feature if it makes extra MySQL queries just to show that user is typing.

Right now I have an iframe on my website which refreshes every 5 minutes to check for new private messages and update my own online users table. Now this can be done with help of Arrowchat. So, I have idea to move all columns from arrowchat_status table to existing online users table. Users who don't show any activity are being removed from this table via cronjob. So, there will be no need for this condition in Arrowchat query:

Code: Select all
AND (arrowchat_status.session_time + 60 + ".$online_timeout.") > ".time()."


because offline users can't exist in ti table. Can I get any problems by moving arrowchat_status to xisting onlin users table?

Thanks.

PostPosted: 09 May 2011, 19:41
by Jason
We're definitely interested in optimizing ArrowChat and the v1.1 update will have a ton of optimization enhancements included.

The file that is executed every 5 seconds for the heart beat is the receive/receive_core.php file.

The banlist and other admin options are saved in a cache file, so they will not have an impact on performance. This includes the trayicons.

Yes, the number of new messages are read in the arrowchat table.

The "is typing" feature is called in two places. When a user makes keyboard movements, the includes/js/arrowchat_core.js file sets the status of the user as typing. This is then received by the other user in the receive/receive_core.php file. It should be pretty apparent when you take a look at that file.

Topic Closed

PostPosted: 07 Nov 2012, 12:40
by Staff Bot
This thread has been locked because the last post is greater than six months old. There is a good chance that the information in this thread is outdated. Please open a new topic if you wish to discuss this further.