Putting the 'role' back in role-playing games since 2002.
Donate to Codex
Good Old Games
  • Welcome to rpgcodex.net, a site dedicated to discussing computer based role-playing games in a free and open fashion. We're less strict than other forums, but please refer to the rules.

    "This message is awaiting moderator approval": All new users must pass through our moderation queue before they will be able to post normally. Until your account has "passed" your posts will only be visible to yourself (and moderators) until they are approved. Give us a week to get around to approving / deleting / ignoring your mundane opinion on crap before hassling us about it. Once you have passed the moderation period (think of it as a test), you will be able to post normally, just like all the other retards.

KickStarter We need more buttons

Hirato

Purse-Owner
Patron
Joined
Oct 16, 2010
Messages
4,001
Location
Australia
Codex 2012 Codex USB, 2014 Shadorwun: Hong Kong
All my processes for open tabs seem to average 70-90% CPU (that is one core) for a full 25-post page now.

It seems to kind of be a combination of mistakes on the developer's end, and the browser's.

Developer:
  • He uses javascript to fade the opacity from 0 to 1, or 1 to 0 explicitly in the style.
  • He also puts some stupid script block before each rating list that defines a minimum opacity, instead of doing a more normal 'data-minimum-opacity' in the rating list's div.
  • When the opacity is 0, he doesn't set the 'visibility' CSS properties on his '.dark_postrating_inputlist' CSS class to 'hidden' or 'collapsed' so that all the buttons don't do a full render pass
Web Browser:
  • They don't take the obvious shortcut for opacity: 0 and treat it as being implicitly 'hidden' or 'collapsed'

setting visibility to hidden reduces the average CPU consumption to 10% for me from the average 70-90%.
What really seems to kill CPU is the great number of these ratings that are animated gifs; without this visibility:hidden, it seems to keep drawing them and animating them in the background.
And also to be fair to the developer, he had made a single spritesheet, and didn't expect people like DU to upload another 50 ratings without a spritesheet, and then have a larger number of animated ones too.
 

Hirato

Purse-Owner
Patron
Joined
Oct 16, 2010
Messages
4,001
Location
Australia
Codex 2012 Codex USB, 2014 Shadorwun: Hong Kong
A little script for stylish to curb the worst of its excesses.

Code:
@namespace url(http://www.w3.org/1999/xhtml);

@-moz-document domain("www.rpgcodex.net") {
  
  /* curb the worst excesses of the ratings */
  ul.dark_postrating_inputlist[style*="opacity: 0;"] {
    visibility: hidden;
  }
}
 

Kev Inkline

(devious)
Patron
Joined
Nov 17, 2015
Messages
5,484
A Beautifully Desolate Campaign Pillars of Eternity 2: Deadfire Pathfinder: Kingmaker Steve gets a Kidney but I don't even get a tag.
y-the-last-man-comic1.jpg
 

Padzi

Liturgist
Joined
Feb 24, 2017
Messages
1,046
Location
Auschwitz-Birkenau

As an Amazon Associate, rpgcodex.net earns from qualifying purchases.
Back
Top Bottom