DWC regressions over time (network/CPU usage)
-
I was playing around in Chrome today and noticed it has a built in "task manager." That showed me something I've suspected for a while: that DWC isn't very lightweight as a web page. So, I decided to
specifically check the network and CPU usage of by DWC, and compare the numbers between an old and new version of DWC.I'm running Chrome 89.0.4389.114 (Official Build) (64-bit) on Windows 10 20H2. At the time of the tests, nothing CPU intensive was running, and only 8 of 32GB of memory was in use. (The machine is a 10 core, 20 thread, i9-10900K.)
I have two Duet based printers, both are attached to the same network switch, on the same VLAN, etc.
"FFCP" is a duet2/Ethernet running RRF 2.05 and DWC 2.07. This printer has 2 tools and a heated bed. DWC is configured for an update interval of 250ms.
"Delta" is a duet3 running RRF 3.2.2 and DWC 3.2.2. This printer only has a single tool and heated bed. DWC is configured for an update interval of 500ms (half as frequent as the FFCP.)
To compare, I closed both of my DWC tabs in Chrome, and re-opened both of them and moved to the "console" page. To make things equal, I made a completely unrelated tab (duet3d's forum page) active. I then opened Chrome's task manager and waited a few minutes for things to settle before taking a screen snippet. Here's that snippet:
This is telling me that the "delta" machine is using twice as much CPU and twice as much network bandwidth for half as many tools being reported half as often (when compared to the "FFCP" machine.)
Expressed a different way, DWC 2.0.7 is over twice as efficient as DWC 3.2.2 when they are doing nothing but reporting the 'status' information (unmoving tool positions and heater temps.)
I'm really not sure the point of this message. I realize that DWC 3.x is probably much less efficient due to having to parse object models (instead of the much smaller old-style status messages.)
If that's the reason for the inefficiency, perhaps RRF/DWC should take a step backwards and use the older style messages at least for the basic status information?