GUI 2.0 is much slower than the old version on LAN

I know the new GUI is a step forward in many ways. But I don’t like the fact it is much slower to render than the old version. It feels sluggish.

It usually takes 4 seconds until I see the main screen. The older version was much faster.
I know this is less of a problem when you have a dedicated screen, and it’s always on. But for a quick check on my laptop/phone, it’s a pain.

It takes 4 seconds and 15 MB of data transferred, just to see SoC and MPPT output…
5 seconds on my phone (Pixel 6a).
The old GUI version needs just 337 KB, and loads instantly.

Macbook Air M1, Cerbo GX (2022).

I’m not familiar with the JS framework you are using for the new GUI, but maybe there is some room for optimisation?

Thanks

1 Like

I made a screen recording to compare both versions side by side (iframe)

https://www.youtube.com/watch?v=ohJvk31ex8M

Hi @vk_1

The 15 mb download should only occur once on the first connection. From then on that bundle should be saved locally.

It will still add a few seconds over the previous method. This is a compromise that comes with some advantages, as the UI is now rendered on the local device and not “streamed”.

This means there can be multiple simultaneous sessions, much more responsive over VRM, among other advantages.

There is also a chance for further optimisations, but for that specific local remote console on LAN use case it is inherently more overhead on first load.

There is also a setting to disable animations, which you may find also speeds it up slightly.

Why is the bundle (venus-gui-v2.wasm) not cached on LAN?
Just let the browser cache it forever: when changing the contents of the file, change its filename.
And keep the file gzipped on disk, with the highest compression setting. Just let nginx read it gzipped and send it as it is. I suspect you let nginx compress it on every access, which is costly on low power HW like Cerbo.

Hi,

Thats strange.

No its stored pre-gzipped.

And cache headers should be such that it remains stored in the browser. Can you check the headers (sounds like you know how to do that?)

Quite some effort went into making this as optimal as possible; including caching both local lan and via vrm, pre-downloading on vrm, etc etc

I double checked that many times, and it seems that Chrome does cache the wasm file when in normal mode, but never caches it in incognito mode. I’m used to testing in incognito mode to prevent any problems with cookies, stale cache entries etc…

I think the problem is the “Cache-Control: no-cache” header. When you replace it with “Cache-Control: max-age=8640000, public”, it would work just fine. In any browser, in any mode.
Just change the filename with every release.

In the current configuration, Chrome always checks for new version of the file, gets “304 Not Modified”, but it takes about 200 msec to verify (maybe Cerbo is slow for that file checking). Not checking at all would be better.

Sadly, even when this 15M file is cached, the page render takes too long. I know I’m not using the latest M4 processor, but who does?

At last: don’t get me wrong, I like this new GUI, just looking for a way to make it faster.

1 Like

Just one more thing, that hit me in the eye:

When I go to VRM, it loads the GUI wasm file every time I access VRM. Even when I don’t use the remote console. I just opened VRM to see the daily solar production, no plan to use the remote console right now. But venus-gui-v2.wasm is loaded anyway.

Caching works fine there ( cache-control: max-age=31536000), but why to load that file when not needed?

The remote console file is locally cached, and then it’s pre-loaded so that if you click the remote console button it happens as quickly as possible.

It should also happen in the background so not affect the loading of the page itself.

Incognito mode has own downside…

Exactly: reason to pre download it on vrm is to, where possible, prevent the user having to wait for it to download when he clicks the Remote Console button.

Incognito mode and cache: we might look into that, but quite honestly its not a prio / using incognito mode is really an edge case and there is a million small changes like that on the list. Hope you understand.

For further research on the opening time, you could google wasm and emscriptem and loading time.

And make a pull request if you solve it :wink::+1:.

But, all this (webassembly, emscriptem) is not an easy topic. Its rather baffling that it works so well on so many browsers and platforms.

3 Likes

Ps. A quick google: Optimizing Code — Emscripten 3.1.71-git (dev) documentation

So there might be ways to fix this. That 15MB is most likely going to be more as a result.

Anyone is welcome to try this themselves (gui-v2 is an open source project).

I’ve added it to our list, but not at the top.

OK, I get it.

It just feels strange that the new shiny app is a lot slower and heavier on resources than the old one.
But you are the company, you know your users, you know their use cases, you have to make decisions and compromises. I don’t :slight_smile:

I have spent 15 years building fast and responsive e-commerce platforms, where first page load is critical. So I’m biased, I admit it.
For me, it has always been about choosing the lighweight framework/technology for the job, in the first place. When a developer brings a new cool tech, “cool” and good looking was never enough for me. He had to prove it will perform well in our scenario.

I don’t need fancy animations, loading progress bars. etc. I just want to see my data quickly. Maybe most of the users don’t feel the same way.

In our country, most people install chinese HW like Goodwe, Solax, etc… All have pretty bad software. Slow, hard to use. I always found Victron superior in software. I hope it stays so.

Thanks for the responses,

Vojtech

2 Likes

Does this mean that to view the remote console on the LAN I will need a new multi-core computer with the latest OS?
Till yesterday I used my iPad2 on LAN and now RC is not loading on it.

Hi @marekp ; no. you can keep using the Classic UI and thus the Remote Console on LAN.

Then why my iPad2 stopped loading RC over LAN?
VRM on this iPad2 stopped working long time ago but I could stil operate RC over the LAN.

Try accessing http://your.rc.ip.address/gui-v1/, should work as usual.

No go.
Adding /gui-v1/ does not make it work.
I just see a white rectangle with “Remote console” in black letters in the middle.

Just to test it, I added /gui-v2/ and got the black screen with white “victron energy” text with Victron logo in front of it. Noting else is happening.

I guess users with that old equipment are not Victrons’ top priority.

I had to steel this macbook from my wife just to be able to write my question here.
My main computer is not compatible with this forum.

“I just see a white rectangle with “Remote console” in black letters in the middle.”

I would restart the GX device. But maybe you already did that?

Reboot of GX did not help.

Then, the best advise I can come up with is to use that other laptop to revert your system to Venus OS v3.42 and keep using that.

Its a real solid and stable version.

I’m sorry, but to move forward we can’t always keep everything working on older hardware. How ever much I’d like to.

1 Like