Comments (13)
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.
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.
- 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
from egui.
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.
Well, at least confirm, please, that there is no bitcoin miner in your code :)
from egui.
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.
@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.
Same issue with the Hobogo game at https://emilk.github.io/hobogo/index.html
from egui.
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.
I've implemented a max-width in egui_web
now: https://emilk.github.io/egui - does that help @meglio ?
from egui.
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.
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.
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)
- `with_always_on_top` causes window to display incorrectly when window size is equal to screen size HOT 12
- Displaying a JPEG image does not work with `image` crate version higher than 0.24 HOT 2
- Using the user agents capabilities for loading images on web
- `ctx.input(|i| i.focused)` always gets `false` for the first few frames
- `with_position` method of ViewportBuilder does not seem to work on wayland
- Better tooltip size management
- Error: WinitEventLoop(NotSupported(NotSupportedError))
- `Style` feature to have label truncate by default HOT 1
- Allow returning errors from eframe app creator
- `SidePanel` frame leaks into `BottomPanel` HOT 3
- Dependency fails to build on nightly
- How to avoid the CMD window pop up when running on Windows? HOT 2
- Allow for manual placement of the canvas element
- Add function to request a repaint to WebRunner
- Improve compile times of `eframe`
- [IME] Can't input CompositionEnd only characters because of checking ccursor.index and ime_cursor.index HOT 2
- Gif Support
- Custom light & dark themes on system theme change HOT 1
- Add a User-Agent header to HTTP image loader HOT 5
- Dithering in Fragment Shader HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from egui.