Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Try Vanilla Forums Cloud product

In this Discussion

popup notifications are very unresponsive, laggy

This discussion is related to the Vanilla addon.
jitesh_tjitesh_t New
edited March 6 in Vanilla 2.5 Help

Hi,

First of all, thank you for this nice Vanilla Forum.

I am using Vanilla version 2.5.1 with Jsconnect plugin.
During a conversation, when any sender messages me, I got popup notifications which are very slow, unresponsive many times.
I have to refresh my browser to view notifications sometimes but that's not an idle solution for users. I don't know what happens in the background.

Basically, I need accurate and fast popup notification if possible.

Please help me to resolve this issue.After this issue, our system will be in very good shape.

Thank you in advance.

Comments

  • Any kind of reply will be greatly helpful.Thank you.

  • jitesh_tjitesh_t New
    edited March 9

    nobody this kind problem with the vanilla forum?

    • nobody faces this kind of problem before with the vanilla forum?
  • R_JR_J Cheerleader & Troubleshooter Munich Moderator

    That is not a problem, that's just the way notifications are implemented.

    When you want to implement notifications you basically have two options:

    1.) Client side:
    Run a JavaScript in the browser that queries for new notifications in an infinite loop.
    Pros: easy to implement, quite robust
    Cons: causes a high impact on the server when too many queries happen

    2.) Server side:
    Web push notifications
    Pros: resource friendly
    Cons: doesn't work with every browser, difficult to implement, requires either an external service or a server with SSH and some kind of queuing on the server


    Vanilla uses the first variant:

        gdn.pingForNotifications = pingForNotifications;
    
        if (gdn.definition('SignedIn', '0') != '0' && gdn.definition('DoInform', '1') != '0') {
            setTimeout(pingForNotifications, 3000);
            setInterval(pingForNotifications, 60000);
        }
    

    If you like to, you can change file /js/global.js and reduce the interval but be aware that this might have a bad impact on your servers overall performance.

    You can also try to implement the second variant, but that would require some skills...

Sign In or Register to comment.