CPU usage on StarMade Dock

    Joined
    Jan 22, 2014
    Messages
    1,047
    Reaction score
    299
    If your computer produces hot air while displaying this site and basically doing nothing, this has two reasons:
    1. The marquee at the bottom. You can easily get rid of it by adding the following URL to a content blocker.
      Code:
      assets2.star-made.org/assets/xenforo-7d6cf8296aee6b22001bf1b707c04934.js
    2. The countdown timer. To get rid of that a little bit more effort is necessary. Install a userscript addon (Greasemonkey on Firefox), create a new userscript and paste the following lines:
      JavaScript:
      // ==UserScript==
      // @name        SMDock
      // @namespace   wat
      // @description Reduce CPU usage on StarMade Dock
      // @include     http://starmadedock.net/forums/
      // @version     1
      // @grant       none
      // ==/UserScript==
      
      $('#countdown').remove()
      This will remove the countdown timer. I'll dig into this when I have the time, maybe I can tune it to update slower.

    CPU usage on Firefox (31 and several older versions) is increased by over 12% with one of these features active. If I enable JavaScript on my mobile browser, my phone will heat up and eat battery. Similar behavior was reported for Chrome in an older thread.

    tl;dr: Performance should come before shiny blingbling, I'm retrofitting the site client-side.

    Edit: By the way, there's no need to use JS for a thing as simple as a marquee. CSS animations have been araound for ages, and especially with this site's target audience the market share of browsers that can't handle them should be pretty much zero. They have the advantage that they don't require constant DOM updates and that browsers can optimize them heavily (rendering them on the GPU, for instance).
     
    Last edited:

    NeonSturm

    StormMaker
    Joined
    Dec 31, 2013
    Messages
    5,110
    Reaction score
    617
    • Wired for Logic
    • Thinking Positive
    • Legacy Citizen 5
    Useful, Agree, Informative, Funny and Creative.
    But I can't rate that much.

    Is there no good plug-in which auto-blocks everything when uses more cpu over more than 1-3 seconds than it should?
    Many google-scripts (YouTube and other sites which hail Big Brother by adding goggle scripts) also heat my PC up.
     

    DukeofRealms

    Count Duku
    Joined
    Sep 4, 2013
    Messages
    1,475
    Reaction score
    1,616
    • Schine
    The marquee at the bottom is actually being removed, and will be replaced by a stationary banner most likely. (Or nothing at all)

    As for the countdown, temporary.
     
    • Like
    Reactions: der_scheme