R3Devil
Posts: 3
Joined: Wed Apr 25, 2018 4:35 pm

Web view straight into framebuffer

Wed Apr 25, 2018 4:41 pm

Hi guys,
I have an application written in node.js and Electron.js.
Running in Chromium, from desktop (Raspbian Jessie), the performance is laggy.

I've been told that running the web view straight to framebuffer (without X) will give me a performance boost.

Unfortunately, I have no experience with this.
Someone here with experience on this that can point me in the right direction?

User avatar
topguy
Posts: 6491
Joined: Tue Oct 09, 2012 11:46 am
Location: Trondheim, Norway

Re: Web view straight into framebuffer

Wed Apr 25, 2018 9:36 pm

Its a possibility that QtWebEngine from Qt5.9+ compiled for RPi with EGLFS support ( OpenGL ES2 ) can be the solution for you.
QtWebengine has a Chromium core and using EGLFS lets you use the GPU for (some of) the rendering.

There are many recepies and scripts out there to build Qt5 for raspbian both for local builds and for cross-compiling, I believe that building QtWebengine is only practical with cross-compiling because of the limited RAM of the Pi.

But before you head down the Qt5 rabbithole you should try to enable the experimental OpenGL driver for X-windows. It might give you the rendering boost you are looking for.

R3Devil
Posts: 3
Joined: Wed Apr 25, 2018 4:35 pm

Re: Web view straight into framebuffer

Wed Apr 25, 2018 9:48 pm

Thank you so much for your reply :)
I have already experimentet with the OpenGL (combined with different ram splits).
This improved the video playing in background, but unfortunately it did not improve the responsivness or the scrolling lag.

I'm searcing the web for solutions. Will definitly check out Qt5 if no other solutions pops up.
Thank you! :)

droleary
Posts: 174
Joined: Fri Feb 09, 2018 3:45 am
Location: Minneapolis, MN USA
Contact: Website Skype

Re: Web view straight into framebuffer

Thu Apr 26, 2018 2:10 am

R3Devil wrote:
Wed Apr 25, 2018 4:41 pm
I have an application written in node.js and Electron.js.
Running in Chromium, from desktop (Raspbian Jessie), the performance is laggy.
Well, you've chosen just about the most inefficient stack to use, so that's not surprising. What's your free look like? Direct rendering seems like a premature optimization if the resource you're actually starved for is RAM. A native app could kill both birds with one stone, though.

R3Devil
Posts: 3
Joined: Wed Apr 25, 2018 4:35 pm

Re: Web view straight into framebuffer

Thu Apr 26, 2018 6:00 am

droleary wrote:
Thu Apr 26, 2018 2:10 am
Well, you've chosen just about the most inefficient stack to use, so that's not surprising. What's your free look like? Direct rendering seems like a premature optimization if the resource you're actually starved for is RAM. A native app could kill both birds with one stone, though.
By free look, do you mean without scrolling - like e.x. the landing page? Well, that looks ok. And it looks ok when mouse hovering over items (which gives an effect).

The reason why we choosed Electron / JS is because of the cross platform ability. We are developing on a PC and my mate is a front end developer.

tpylkko
Posts: 409
Joined: Tue Oct 14, 2014 5:21 pm

Re: Web view straight into framebuffer

Thu Apr 26, 2018 8:48 am

no, like free as in the program/package that outputs RAM usage information.

User avatar
topguy
Posts: 6491
Joined: Tue Oct 09, 2012 11:46 am
Location: Trondheim, Norway

Re: Web view straight into framebuffer

Thu Apr 26, 2018 9:20 am

Run "top" or "cat /proc/meminfo"

The answer you are looking for is "MemTotal" minus "Active" (called "used" in top).

Return to “Advanced users”