-
-
Notifications
You must be signed in to change notification settings - Fork 21.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lag spikes after exporting to the Web #86913
Comments
What browser are you testing these on? To my dismay, it makes a huge difference. |
This comment was marked as abuse.
This comment was marked as abuse.
This comment was marked as abuse.
This comment was marked as abuse.
This comment was marked as abuse.
This comment was marked as abuse.
I corrected it to the normal English phrase, "spike lags" isn't a phrase in English. No one will be confused by a commonly used term being used 🙂 Please be constructive and positive, see the code of conduct. |
This comment was marked as abuse.
This comment was marked as abuse.
Please be professional and bringing my profile and my views into this is neither professional nor appropriate, keep on topic and be mature, read the code of conduct Have a nice day |
This is standard shader compilation stutter, which is already being tracked in #61233 (and #86731 for Compatibility specifically). It's more pronounced on the web platform because most browsers go through ANGLE to translate OpenGL to Direct3D (on Windows) or Metal (on macOS). You need to instance your objects to be visible in front of the camera for a single frame, so that the shader is compiled in advance, rather than during gameplay. The same applies to particle effects, etc. |
This comment was marked as abuse.
This comment was marked as abuse.
I consider this to be a clear breach of our Code of Conduct, both from @mirodorr192 and from the (apparently sockpuppet account, already deleted by GitHub) @raceh25857 who upvoted it. So this results in a ban. Have a nice further gamedev journey, aim to be more respectful of your peers. |
Tested versions
4.1.3 / 4.2.1
System information
Windows 10, Compatibility mode
Issue description
### FIXED! Just ported to Unity and it works great!
For some reason, when i have exported my project as
HTML
, i have noticed a lot of lags, especially when instantiating a new objects and adding them as childs usingadd_child
.Tried to show it here:
Generally it have a lot of freezes / lags, i would like to know how to fix it.
The lags appears only when exporting for Web.
on PC this lag seems very small (but in 4.2.1 it looks exactly like in browser)
[ Browser testing (.html) ]
I'm getting 28-35 fps from 60 needed on my laptop.
Also, tested on high-res screen -> 22-24 / 60 fps
[ PC testing (.exe) ]
about 55/60 fps on laptop
about 40/60 fps on high-res screen
It's not a such big game to have such lags, it's not even a demo, it's just an test run.
upd. What i have noticed is when i creating the bullet (not only bullet but any node stored in var) at first time it have that lag.
Steps to reproduce
html
)add_child
)Minimal reproduction project (MRP)
no need, it works the same for all of my projects
The text was updated successfully, but these errors were encountered: