ID:1977463
 
BYOND Version:509.1312
Operating System:Windows 10 Pro 64-bit
Web Browser:Chrome 46.0.2490.80
Applies to:BYOND Pager
Status: Open

Issue hasn't been assigned a status value.
Descriptive Problem Summary:
Two issues which may be related:
  1. Switching tabs in the BYOND Pager - at least back and forth between 'feed' and a pager message from another BYOND user - seems to react sluggishly. This is on a machine with a quad-core processor and plenty of RAM, so I think this is a performance bottleneck.
  2. When I received the pager message I clicked on the BYOND Pager in my system tray and switched back and forth between the feed and the pager message since I also had a pending message on the 'feed' tab. This resulted in the pager utilizing 100% CPU of a single core (12% in my case) constantly while memory usage slowly increased every second. This did come to a halt on its own however I'm confused why this happened in the first place.

    This is reproducible on my system by starting the pager and switching between tabs as described in item no. 1. Once the " CPU temper tandem" subsides it no longer occurs, though memory seems to peak at 400 MB+ before CPU goes back down.
Expected Results:
A fast & smooth pager.

Actual Results:
Switching tabs seems to behave sluggishly and CPU + memory may spike under some circumstances.

Does the problem occur:
Every time? Or how often?
Sluggish switching tabs occurs every time. CPU spike has only been observed once but may be reproducible somehow by sending a pager message. (I'm not popular enough to receive multiple pager messages yet so it may be a while before I can reproduce this one.)
In other user accounts?
Untested, though my account is a standard Windows 10 "administrator" account type, so I see no way this could be the cause.
On other computers?
Untested. My computer is high-end, so it shouldn't suffer from slowdowns from BYOND unless there is a performance bottleneck. (I mean, it was even able to run an unpatched version of Batman: Arkham Knight, and you can't really ask for more.)

Did the problem NOT occur in any earlier versions? If so, what was the last version that worked? (Visit http://www.byond.com/download/build to download old versions for testing.)
Unknown. I think a browser component is being used, so perhaps an issue with IE11 on Windows 10? But I'm just speculating though.

Workarounds:
CPU issue though confusing resolved itself after a while, but can be reproduced by restarting the pager (at least on my system).

Issue with slow tab switch persists regardless of CPU usage, though there is a noticeable CPU spike when you switch tabs.
There are some known performance issues in the pager; this isn't new. I'll take another look into it soon.

Quad-core is meaningless when it comes to measuring performance, because BYOND is single-threaded. Even the pager has just one thread.
In response to Lummox JR
Lummox JR wrote:
Quad-core is meaningless when it comes to measuring performance, because BYOND is single-threaded. Even the pager has just one thread.

Hence the problem -- if I'm getting lag spikes with a quad core CPU, imagine what someone with an older system is getting. ;)
There's a chance an older processor can handle BYOND better than your quad-core one. Considering a single core of that older processor might out-clock your fancy new one ;)
In response to NullQuery
NullQuery wrote:
Lummox JR wrote:
Quad-core is meaningless when it comes to measuring performance, because BYOND is single-threaded. Even the pager has just one thread.

Hence the problem -- if I'm getting lag spikes with a quad core CPU, imagine what someone with an older system is getting. ;)

The number of cores is irrelevant. It's about clock speed and maybe certain optimizations.
The pager may be written to be single-threaded, but components used by the pager (I think mainly the browser component) may not necessarily be. If switching between tabs is sluggish for me, it's going to be slower for someone who only has a single core to do all the work. The number of cores is relevant in this case.

When I saw the CPU spike for the byond.exe process it didn't cap at 12%. Sometimes it jumped to 15%. AFAIK the only explanation for that are processes running on a separate thread that are not obvious to the developer, such as the browser component.
In response to NullQuery
NullQuery wrote:
The pager may be written to be single-threaded, but components used by the pager (I think mainly the browser component) may not necessarily be. If switching between tabs is sluggish for me, it's going to be slower for someone who only has a single core to do all the work. The number of cores is relevant in this case.

JavaScript won't, IIRC, ever use multiple cores unless a worker thread is involved. So too the browser. Chrome may operate that way, but I doubt embedded IE is using multiple cores. Plus, I can tell you for sure that the call that invokes a JavaScript command from the C++ frontend is a blocking call.

When I saw the CPU spike for the byond.exe process it didn't cap at 12%. Sometimes it jumped to 15%. AFAIK the only explanation for that are processes running on a separate thread that are not obvious to the developer, such as the browser component.

I believe you may be seeing the effects of hyperthreading in play. That doesn't require the use of more than one core. In any event I've never seen evidence of byond.exe using multiple cores on a multi-core system.