gigitux / youpforwhatsapp

A simple wrapper written in rust and gtk-rs for whatsapp web
MIT License
85 stars 9 forks source link

Potential reasons for bad performance? #42

Open kaimast opened 3 years ago

kaimast commented 3 years ago

I noticed the application does not scroll as smooth as one would expect. I compared it to epiphany, which also uses webkit2gtk, and the latter performs much better.

My first guess was that hardware acceleration was not enabled for some reason, but even after setting flags like WEBKIT_FORCE_COMPOSITING_MODE it did not seem to improve.

Have you noticed this before? I wonder if this is a bug with the gtk rust bindings.

gigitux commented 3 years ago

There is probably a flag to enable smooth scrolling.

I will try to fix!

kaimast commented 3 years ago

I think there is. Let me know if you figure it out.

Kind of off-topic: The reasonI noticed it in the first place was that I was playing around with building a Twitter wrapper based on the Youp codebase. It works but performance is extremely bad. There is a flag to force enable hardware acceleration but that makes the application freeze after a few second for some reason...

gigitux commented 3 years ago

There is the function set_enable_smooth_scrolling on Settings Webkit type to enable smooth scrolling.

If you have problems, you can reach me on discord or telegram to discuss about your problem :)

kaimast commented 3 years ago

I think performance of webkit gtk is just not that great in general. See this bug report for example.

gigitux commented 3 years ago

I think performance of webkit gtk is just not that great in general. See this bug report for example.

Yep, performance of webkit gtk is not perfect :D

But on the first post you said that performance of epiphany > wrapper gtk: this is a problem :D