Performance with ClientRequestHandlers

Post here your questions about SFS2X. Here we discuss all server-side matters. For client API questions see the dedicated forums.

Moderators: Lapo, Bax

User avatar
ekrem5353
Posts: 118
Joined: 10 Dec 2015, 15:50

Performance with ClientRequestHandlers

Postby ekrem5353 » 20 Jun 2017, 08:14

Hi,

I am wondering, if BaseClientRequestHandlers that we add to SFSExtensions doesn't have any state, isn't it better to put All of them @Instantiation(InstantiationMode.SINGLE_INSTANCE) or am I wrong?

example

Code: Select all


@Instantiation(InstantiationMode.SINGLE_INSTANCE)
public class PlayCardHandler extends BaseClientRequestHandler {
....

***********************************************************

public class GameRoomExtension extends SFSExtension {

 @Override
    public void init() {
        addRequestHandler("$PC", PlayCardHandler.class);
   }

}


Thanks..
User avatar
Lapo
Site Admin
Posts: 23026
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Performance with ClientRequestHandlers

Postby Lapo » 03 Jul 2017, 14:17

Hi,
sorry for the delayed response. I usually receive a notification for each message, but not this one :(

Back to your question --> yes it can improve performance a bit.

Cheers
Lapo
--
gotoAndPlay()
...addicted to flash games

Return to “SFS2X Questions”

Who is online

Users browsing this forum: No registered users and 63 guests