Giter VIP home page Giter VIP logo

Comments (13)

emilk avatar emilk commented on May 15, 2024 1

Thanks to @not-fl3 I now know this is a bug in Firefox: https://twitter.com/fedor_games/status/1342838418343141381 https://bugzilla.mozilla.org/show_bug.cgi?id=1010527#c0

from egui.

emilk avatar emilk commented on May 15, 2024

Hi!

No, this is quite unexpected! I have no problems in my version of Firefox running on my Mac.

What platform are you on? Laptop/desktop? What graphics card?

Does it still happen if you scale down the browser window?

What does the ms / frame read (left hand side on https://emilk.github.io/egui/)?

from egui.

meglio avatar meglio commented on May 15, 2024
  • Mac OS Big Sur 11.0.1 (20B50)
  • Firefox 83.0 (64-bit)
  • MacBook Pro late 2015
  • CPU goes quiet ~30 seconds after I switch to another tab.
  • ms / frame is always smaller than 5ms
  • looks like sizing the window down helps a bit, but it's difficult to measure

Graphics card:
image

from egui.

emilk avatar emilk commented on May 15, 2024

Sounds like a GPU-side problem then. My WebGL skills are not great, and I don't really have the time to investigate this right now. There should theoretically be no problem at all with the GPU rendering, but WebGL is weird and maybe there is some subtlety when using large canvases.

That it is your CPU that spikes seems to indicate that FireFox is rendering on the CPU instead of the GPU, which is weird.

If anyone is good at web tools and diving into why large canvases + WebGL is sometimes so slow, that would be greatly appreciated.

from egui.

 avatar commented on May 15, 2024

Well, at least confirm, please, that there is no bitcoin miner in your code :)

from egui.

meglio avatar meglio commented on May 15, 2024

Re WebGL, I'm not that experienced to dig into it, but for sure desktop games run just fine on this Desktop, like e.g. Witness.

from egui.

emilk avatar emilk commented on May 15, 2024

@meglio you can also clone this repo and run cargo run --release -p demo_glium and verify that the exact same Egui demo runs fast when native (as I and epxect it will).

from egui.

meglio avatar meglio commented on May 15, 2024

Same issue with the Hobogo game at https://emilk.github.io/hobogo/index.html

from egui.

dneumair avatar dneumair commented on May 15, 2024

Hi @meglio,
be sure, that you have hardware acceleration in firefox enabled... At least on windows it is possible to turn it off

from egui.

emilk avatar emilk commented on May 15, 2024

I've implemented a max-width in egui_web now: https://emilk.github.io/egui - does that help @meglio ?

from egui.

meglio avatar meglio commented on May 15, 2024

So, let's look at it this way: there is a bug in Firefox that has been there for years, and is still making it impossible to use egui in the browser (one of the major browsers). Kind of being unfortunately ala vendor-locked.

from egui.

emilk avatar emilk commented on May 15, 2024

I definitely wouldn’t say it is impossible to use egui in Firefox. It just hurts the FPS and adds cpu usage, but it still works pretty well

from egui.

meglio avatar meglio commented on May 15, 2024

When I tested it, it did not work pretty well, unfortunately :( Adding CPU usage that much just makes it not a viable option.

from egui.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.