All of lore.kernel.org
 help / color / mirror / Atom feed
* Optimising imx6 performance for HTML5 using Cog + WPE WebKit
@ 2019-10-23 11:27 Andy Pont
  2019-10-23 11:57 ` [wpe-webkit] " Carlos Alberto Lopez Perez
  2019-10-29  9:29 ` Wouter Vanhauwaert
  0 siblings, 2 replies; 4+ messages in thread
From: Andy Pont @ 2019-10-23 11:27 UTC (permalink / raw)
  To: meta-freescale Mailing List; +Cc: yocto, webkit-wpe

Hello,

Broadening this out to the Freescale and Yocto mailing lists to see if 
any one has any answers…

We are using Cog and WPE Webkit on an i.MX6 Solo based board with a user 
interface that is based on HTML5, Javascript and CSS and are having some 
issues with fading and other canvas effects.  The board is running a 
Yocto image with the following in conf/local.conf:

PREFERRED_PROVIDER_virtual/wpebackend = "wpebackend-rdk"
PACKAGECONFIG_pn-wpebackend-rdk = "imx6"

PACKAGECONFIG_append_pn-cairo = " glesv2 egl"
PACKAGECONFIG_append_pn-wpewebkit = " 2dcanvas"

We start the browser with the following command line:

cog --enable-accelerated-2d-canvas=1 appui/index.html

Are there any other settings we should be using either in the Yocto 
build or when launching Cog as we are finding the CPU usage is >90%?

Is there a definitive way to show that all of the necessary drivers are 
loaded and Cog is making use of the GPU?

I have tried this with Cog 0.3.0 built with WPE WebKit 2.24.1 and Cog 
0.4.0 built with WPE WebKit 2.26.1 and both give the same dissappointing 
results, as does running on the iMX6Q-SDP board I also have here.

-Andy.



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [wpe-webkit] Optimising imx6 performance for HTML5 using Cog + WPE WebKit
  2019-10-23 11:27 Optimising imx6 performance for HTML5 using Cog + WPE WebKit Andy Pont
@ 2019-10-23 11:57 ` Carlos Alberto Lopez Perez
  2019-10-23 12:29   ` Andy Pont
  2019-10-29  9:29 ` Wouter Vanhauwaert
  1 sibling, 1 reply; 4+ messages in thread
From: Carlos Alberto Lopez Perez @ 2019-10-23 11:57 UTC (permalink / raw)
  To: Andy Pont, meta-freescale Mailing List; +Cc: yocto, webkit-wpe


[-- Attachment #1.1: Type: text/plain, Size: 1651 bytes --]

On 23/10/2019 13:27, Andy Pont wrote:
> Hello,
> 
> Broadening this out to the Freescale and Yocto mailing lists to see if
> any one has any answers…
> 
> We are using Cog and WPE Webkit on an i.MX6 Solo based board with a user
> interface that is based on HTML5, Javascript and CSS and are having some
> issues with fading and other canvas effects.  The board is running a
> Yocto image with the following in conf/local.conf:
> 
> PREFERRED_PROVIDER_virtual/wpebackend = "wpebackend-rdk"
> PACKAGECONFIG_pn-wpebackend-rdk = "imx6"
> 
> PACKAGECONFIG_append_pn-cairo = " glesv2 egl"
> PACKAGECONFIG_append_pn-wpewebkit = " 2dcanvas"
> 
> We start the browser with the following command line:
> 
> cog --enable-accelerated-2d-canvas=1 appui/index.html
> 

How the performance compares if you disable accelerated-2d-canvas?
It gets worse or its the same?

> Are there any other settings we should be using either in the Yocto
> build or when launching Cog as we are finding the CPU usage is >90%?
> 
> Is there a definitive way to show that all of the necessary drivers are
> loaded and Cog is making use of the GPU?
> 
> I have tried this with Cog 0.3.0 built with WPE WebKit 2.24.1 and Cog
> 0.4.0 built with WPE WebKit 2.26.1 and both give the same dissappointing
> results, as does running on the iMX6Q-SDP board I also have here.
> 

Usually on the web application side there are different things that can
be optimized to make it perform better on WPE.
I think it would be helpful to understand the problem if you can share a
demo of your web app where the performance problem can be easily reproduced.


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 914 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [wpe-webkit] Optimising imx6 performance for HTML5 using Cog + WPE WebKit
  2019-10-23 11:57 ` [wpe-webkit] " Carlos Alberto Lopez Perez
@ 2019-10-23 12:29   ` Andy Pont
  0 siblings, 0 replies; 4+ messages in thread
From: Andy Pont @ 2019-10-23 12:29 UTC (permalink / raw)
  To: Carlos Alberto Lopez Perez, meta-freescale Mailing List; +Cc: yocto, webkit-wpe

[-- Attachment #1: Type: text/plain, Size: 974 bytes --]

Carlos wrote...

>>
>>  We start the browser with the following command line:
>>
>>  cog --enable-accelerated-2d-canvas=1 appui/index.html
>>
>
>How the performance compares if you disable accelerated-2d-canvas?
>It gets worse or its the same?
It is the same. I have been testing with http://fabricjs.com//animation 
and https://themaninblue.com/experiment/AnimationBenchmark/canvas/ and 
in all circumstances I see 10-12fps.

>Usually on the web application side there are different things that can
>be optimized to make it perform better on WPE.
>I think it would be helpful to understand the problem if you can share a
>demo of your web app where the performance problem can be easily reproduced.
The web app is responding to data being sent to it over a websocket 
connection from a backend application. I’ll see if we can create 
something that doesn’t rely on the websocket interface that can be run 
in the browser on its own.

-Andy.



[-- Attachment #2: Type: text/html, Size: 2580 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [wpe-webkit] Optimising imx6 performance for HTML5 using Cog + WPE WebKit
  2019-10-23 11:27 Optimising imx6 performance for HTML5 using Cog + WPE WebKit Andy Pont
  2019-10-23 11:57 ` [wpe-webkit] " Carlos Alberto Lopez Perez
@ 2019-10-29  9:29 ` Wouter Vanhauwaert
  1 sibling, 0 replies; 4+ messages in thread
From: Wouter Vanhauwaert @ 2019-10-29  9:29 UTC (permalink / raw)
  To: Andy Pont, meta-freescale Mailing List; +Cc: yocto, webkit-wpe

> -----Original Message-----
> From: webkit-wpe [mailto:webkit-wpe-bounces@lists.webkit.org] On Behalf Of
> Andy Pont
> Sent: woensdag 23 oktober 2019 13:27
> To: meta-freescale Mailing List <meta-freescale@yoctoproject.org>
> Cc: yocto@yoctoproject.org; webkit-wpe@lists.webkit.org
> Subject: [wpe-webkit] Optimising imx6 performance for HTML5 using Cog +
> WPE WebKit
> Hello,
> 
> Broadening this out to the Freescale and Yocto mailing lists to see if any one
> has any answers…
> 
> We are using Cog and WPE Webkit on an i.MX6 Solo based board with a user
> interface that is based on HTML5, Javascript and CSS and are having some
> issues with fading and other canvas effects.  The board is running a Yocto
> image with the following in conf/local.conf:
> 
> PREFERRED_PROVIDER_virtual/wpebackend = "wpebackend-rdk"
> PACKAGECONFIG_pn-wpebackend-rdk = "imx6"
> 
> PACKAGECONFIG_append_pn-cairo = " glesv2 egl"
> PACKAGECONFIG_append_pn-wpewebkit = " 2dcanvas"
> 
> We start the browser with the following command line:
> 
> cog --enable-accelerated-2d-canvas=1 appui/index.html
> 
> Are there any other settings we should be using either in the Yocto build or
> when launching Cog as we are finding the CPU usage is >90%?
> 
> Is there a definitive way to show that all of the necessary drivers are loaded
> and Cog is making use of the GPU?
> 
> I have tried this with Cog 0.3.0 built with WPE WebKit 2.24.1 and Cog
> 0.4.0 built with WPE WebKit 2.26.1 and both give the same dissappointing
> results, as does running on the iMX6Q-SDP board I also have here.

Problem with 'interface based on HTML5, javascript and CSS', is that it can be done in a thousand ways...
Some of them will fall back to hardware, and some of them will need calculation so take CPU time.
Without an insight in a code-abstraction, it's impossible to tell what the issue is.

https://medium.com/outsystems-experts/how-to-achieve-60-fps-animations-with-css3-db7b98610108 => some hints on how to improve mobile performance
https://www.sitepoint.com/introduction-to-hardware-acceleration-css-animations/ => some more hints to leverage functions to hardware

But I also don't reach 60fps on imx6 (yet?)

Grt,
Wouter

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-10-29  9:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-23 11:27 Optimising imx6 performance for HTML5 using Cog + WPE WebKit Andy Pont
2019-10-23 11:57 ` [wpe-webkit] " Carlos Alberto Lopez Perez
2019-10-23 12:29   ` Andy Pont
2019-10-29  9:29 ` Wouter Vanhauwaert

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.