question

nickdb avatar image
nickdb asked

VRM portal - heavy on browser resources

Like many I use VRM a lot. The site seems to be using more and more browser resources, with various systems raising alerts. On a high spec system it was using 25% CPU.

There have been many improvements but it does seem like the site has become inefficient and could use optimising.

My main browsers are safari and firefox.

VRM
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

7 Answers
mvader (Victron Energy) avatar image
mvader (Victron Energy) answered ·

Hi Nick, just a message to say that I've seen this. We'll check. Thank you for the feedback! Matthijs

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

ikeakayke avatar image
ikeakayke answered ·

Just a shut out that this still happens to this day. It works pretty snappy at first load, but if left opened for a while it gets heavier and heavier, even the realtime animation is lagging.

This happens in all browsers including the vrm app on android.

I believe it's a problem with a javascript function that either memory leaks or gets confused and re-loops indefinetely adding pressure to the stack.

It's so bad that a friend of mine with a huawei system laughed in my face that vrm feels like 90's technologies even on latest badass computer and strong FO internet.

I dealed with javascript before and I'm 100% this is the cause.

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

peregrines avatar image
peregrines answered ·

Same problem here. VRM is laggy and acts like it is almost freezing. My system is very powerful and it seems ridiculous that a company like Victron is not optimizing its main Data-Analytics-Service.
Please fix it! Thank You :)

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

mvader (Victron Energy) avatar image
mvader (Victron Energy) answered ·

Sorry to hear that there are still issues with this! Various improvements were made over time; VRM is used a lot; and I don't hear many complaints about this.

I use it a lot as well and don't notice any slowness.


We'll make sure to look into this further (!). Thank you for raising the alarm.

3 comments
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

ikeakayke avatar image ikeakayke commented ·

At first glance after about 10min js heap size grows from 60MB to over 100MB at which point the spikes in cpu get to 100% and more often, sometimes it freezes for a few seconds.

Also some potential problems maybe it helps in debug/optimize:

- style recalcs/sec is concerning at 100+/s.. when noone is resizing anything it should be either 0 or at least very close.

- DOM nodes seem excessive at 27k. Combined with style recalcs it gets very busy. so busy that the animated svg for realtime freezes as well so whole main browser thread is locked in waiting.

- js heap size keeps growingeven up to 150MB! and sometimes after a few minutes a major GC takes place (which causes another freeze in itself) and cleans it but only makes it 25-30MB less - it started at 60 but is never able to get back there

- the heap size itself is pretty big, there are full screen 2d games with multiplayers, 2d canvas, 240fps that are smoother and take js heap from 10 to 20MB with lots of graphics or 3-5 MB with minimal. Comparing these with the elements composing vrm page, it seems huge to need 60MB for the main layout. I get that there might be some arrays with data sampling but for one day in dashboard (so not advanced with history) these should be insignificant in ram size.

- if at first the cpu usage idles (on my system) at around 10-11% and the spikes at around 60-75%, when it starts to lag heavily, the "idleing" is at 50%, spikes at 100% (and therefore take more time and freeze).

- the equals function in angular.js seems suspiciously abused as in bottoms-up it hogs a lot of cpu time.

- sometimes it's best to write simple custom js functions tailored for the project instead of using resource hogging libraries.


I'm sure the developers will make more sense out of the above than me and I hope they'll be useful starting points.

capture.png

2 Likes 2 ·
capture.png (220.1 KiB)
mvader (Victron Energy) avatar image mvader (Victron Energy) ♦♦ commented ·

Short update: dev team is looking into this now; and seems to be progress but its too early share give any details.


Thank you for your additions, helpful!

0 Likes 0 ·
ikeakayke avatar image ikeakayke mvader (Victron Energy) ♦♦ commented ·

1680292009794.pngI made a complex grafana dashboard and here are some numbers for comparison. The ammount of data is infinitely bigger than the default VRM dashboard, yet everything is easy on the resources. Little spikes in cpu for the updates (<35%), styles recalc are idling at 0 until next refresh (in this case 5s) dom nodes number very appropiate. I suspect even this dashboard can be further tuned, but seems "quiet" as it is. Back to VRM, maybe the graphs are updated in realtime as well instead of just the numeric values, and graphs at x seconds?


But then again I also compared it to the advanced dashboard on vrm where it seems to be the same issue.

Regards,

1 Like 1 ·
1680292009794.png (380.4 KiB)
towatai avatar image
towatai answered ·

Good to read that I am not alone in this impression. I have noticed the same behavior on various systems and had already suspected some kind of misconfiguration on my Easysolar II GX. I tried it with different, current browsers like Edge, Firefox, Chrome and Brave. Everywhere it feels tough as chewing gum after some time. By the way, I installed all betas of the 3.00 version the last weeks and months... since today the 3.00~24

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

christiangurk avatar image
christiangurk answered ·

Same problem here with Chrome. After some minutes, fan of notebook is start spinning, high CPU load. Would be nice, if you could find some fixes.

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

dmsims avatar image
dmsims answered ·

Just to say I do NOT get this issue. Had VRM open for 24+ hours Chrome CPU is 0.1 to 0.3% (Windows 11)

chrome.png


chrome.png (13.1 KiB)
2 comments
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

ikeakayke avatar image ikeakayke commented ·
You need to check cpu using performance monitor in chrome dev tools while the vrm tab is opened and visible (not occluded) and realtime visibly connected. Otherwise chrome turns off running javascript for minimized, not focused or occluded tabs.
1 Like 1 ·
dmsims avatar image dmsims ikeakayke commented ·
Still no issue
0 Likes 0 ·

Related Resources

Additional resources still need to be added for this topic