1. The forums will be archived and moved to a read only mode in about 2 weeks (mid march).

seccond AsyncTask?

Discussion in 'Development' started by LucGamesDE, Mar 24, 2017.

  1. LucGamesDE

    LucGamesDE Baby Zombie

    Messages:
    170
    I created a AsyncTask where I check the status of another server on command and per sign. But if I refresh the signs every second with the AsyncTask the response of the commands is very slow. I already made a seccond task for only the signs. But it doesn't change anything
     
  2. robske_110 (Tim)

    robske_110 (Tim) Wither Skeleton Poggit Reviewer

    Messages:
    1,342
    GitHub:
    robske110
    it will always take some time. If it's awfully slow you might want to show us your code. You could also try caching the results, so it will display the status from a few secounds ago, but will still be there. You might also want to use SSS's API https://github.com/robske110/SignServerStats#api which already does caching for you.
     
    Jack Noordhuis likes this.
  3. LucGamesDE

    LucGamesDE Baby Zombie

    Messages:
    170
    If I don't refresh the signs it works normally. Could it be that the sign refresh every scond is spamming the task?
     
  4. robske_110 (Tim)

    robske_110 (Tim) Wither Skeleton Poggit Reviewer

    Messages:
    1,342
    GitHub:
    robske110
    I don't know because you don't show me any code you use. I am currently working on a plugin for SSS which will display servers in a list, so you may just wait until i get that done.
     
    SOFe and Muqsit like this.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.