+ Reply to Thread
Results 1 to 7 of 7

Thread: the client lag when to much message are send from the client

Hybrid View

  1. #1
    Member
    Join Date
    Jan 2012
    Posts
    36
    Thanks
    2
    Thanked 3 Times in 2 Posts

    the client lag when to much message are send from the client

    Hello , i got a probleme with my client unity 3d , when he send a lot ammount of message , he no manage any of receive message , so if my client send about 6 message per seconde for 3 seconde , he start to do Onpluginmessageevent only after the client stop sending message

    and i want to know if it possible to stop print the RECV and SEND message in console ?

    thanks for help

  2. #2
    Administrator tcarr's Avatar
    Join Date
    Dec 2007
    Posts
    7,214
    Thanks
    80
    Thanked 1,087 Times in 1,076 Posts
    6 messages per second shouldn't take very long to send, unless the messages are complicated or your connection is noisy.

    Are you calling _es.Engine.Dispatch() in FixedUpdate? That usually makes messaging more consistent. How many milliseconds are you using for your FixedUpdate?

    Another thing to check is the ES5 server. If the JVM garbage collection isn't a concurrent one, it will stop processing plugin requests and stop sending plugin events while the GC is running, which can take a full second, then the plugins catch up and you get a clump of plugin events all at once. Let me know if you think this might be the problem.

    I'll have to research the console logging for Unity. I know how to do it for AS3, but that won't help you.
    Teresa Carrigan
    Senior Engineer
    Electrotank, Inc.

  3. #3
    Administrator tcarr's Avatar
    Join Date
    Dec 2007
    Posts
    7,214
    Thanks
    80
    Thanked 1,087 Times in 1,076 Posts
    I'm guessing, from looking at the code, but try this, "using System" and "using log4net.Config":
    Code:
    LogManager.IsDebugEnabled = false;
    Let me know whether it works. If it does, I'll add it to the manual, and if it doesn't I'll dig some more into the code.
    Teresa Carrigan
    Senior Engineer
    Electrotank, Inc.

  4. #4
    Member
    Join Date
    Jan 2012
    Posts
    36
    Thanks
    2
    Thanked 3 Times in 2 Posts
    thanks for response , that can't be my connection speed cause it fiber, and when i launch 2 instance of my unity and make one of them lauch a lot of send message/sec only this session is lagging ! not the other one so that can't be the server . my fixedupdate is 0.02 .

    and this work : (using log4net; ) thanks
    Code:
    LogManager.IsDebugEnabled = false;
    Last edited by atlantis; 05-23-2012 at 03:24 PM.

  5. #5
    Administrator tcarr's Avatar
    Join Date
    Dec 2007
    Posts
    7,214
    Thanks
    80
    Thanked 1,087 Times in 1,076 Posts
    Try increasing your fixed update time to 0.2 and see if that helps. I'm guessing that your client is having trouble processing the messages before the next fixed update time arrives.

    Use queued messaging on the plugin where possible, particularly if there are messages where only the most recent one matters (so you use a queue label and when the aggregate message is sent only the most recent with that particular label is sent).

    Thanks for letting me know that the logging tweak worked. I'll add that to the manual.
    Teresa Carrigan
    Senior Engineer
    Electrotank, Inc.

  6. #6
    Member
    Join Date
    Jan 2012
    Posts
    36
    Thanks
    2
    Thanked 3 Times in 2 Posts
    with the fixed update to 0.2 it work better , but still have little delay when sending mass SEND , think just have to optimise it for sending less message at same time, i already use queued pluging , but not even try the queue labe , i will try it .

  7. #7
    Administrator tcarr's Avatar
    Join Date
    Dec 2007
    Posts
    7,214
    Thanks
    80
    Thanked 1,087 Times in 1,076 Posts
    If you have questions about queue label, I'm happy to answer them. If you just want the most recent message (any message) from each player, use the player's username for the queue label on the messages. If there are messages that you don't want dropped, don't add a queue label. If there are different types of messages being sent that you just want the most recent of for each type for each user, you can do something like username + "pos" and username + "anim" or whatever.
    Teresa Carrigan
    Senior Engineer
    Electrotank, Inc.

+ Reply to Thread

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts