blenderplayer painfully slow in recent builds #37898
Labels
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
4 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#37898
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
System Information
OS: Ubuntu 13.04 (64 bit)
Graphics: ATI Mobility Radeon HD 5430
Blender Version
Broken: Blender 2.69
e9e08a1
(from buildbot)Broken: Blender 2.69
48b9680
(own build)Worked: Blender 2.69
6d8f76c
(from buildbot)Short description of error
Older versions of blenderplayer worked fairly well with my game (15-25fps), now they are very slow indeed (1.1fps).
Exact steps for others to reproduce the error
Start a game that contains a fairly complicated scene. Details for the one I'm testing with are listed below - but this is by no means a minimal test case.
cargo
executable, and instead runblenderplayer assets/Outdoors.blend
. Notice that the frame rate is much slower in recent versions.Although
e9e08a1
is the earliest version I've tried so far that has the bug, I'm pretty sure this is not a bug in the LOD code. Here is a screenshot of a profiler that I ran while running the game:This profile was taken after the game had finished loading, and yet a great deal of time was spent loading images. I think this is not the case in
6d8f76c
(which doesn't have the bug) - although I still need to build that version with debug symbols to be sure.Changed status to: 'Open'
Added subscriber: @z0r
Added subscriber: @Moguri
Seeing as the __libc_start_main is such a low percentage, I guessing your game is GPU bound. This means we have to find what changed for the GPU.
Yep - my suspicion is that all images (textures) are being re-loaded on every frame and transferred to the GPU.
It seems this was caused by the image cache rewrite on the 13th of December:
ce893552c3
Added subscribers: @Sergey, @ideasman42
Segey, any thoughts on this bug?
To be clear: this bug only happens in blenderplayer; not when running the game in blender.
..ah, I see this has a change in do_versions! I'll re-save all my asset files. Maybe that's it.
That wasn't it :) I re-saved everything with
58ae499
and the bug is still present.I don't see what could be causing the extra GPU load, unless cache misses are triggering texture uploads somehow. That would lead me to suspect something isn't being properly initialized in the BGE, but I don't see any new initialization code. Hopefully Sergey can shed some light on this.
This is due to images needed for the level doesn't fit into the cache limit. Easy fix would be to disable cache limitor whe BGE is running, but maybe i'll think something smarter today.
P.S. Noticed some more issues with the cache rewrite, working on all this now.
This issue was referenced by blender/blender-addons-contrib@ff9974ed69
This issue was referenced by
ff9974ed69
Changed status from 'Open' to: 'Resolved'
Closed by commit
ff9974ed69
.Solved for now by disabling cache limiter. This brings up old behavior, but would be cool to discuss better cache policies here.
Thank you, Sergey! I'm happy to have a discussion about cache policies.
Do we event need to keep images in the cache? Once they're in the GPU memory, that should be enough, right? They could be discarded from the cache at that point - with video textures being a special case (maybe they don't even use the cache now).
So, now I just need to wait for the buildbot maintainers to come back from holiday to make my release. That's a pretty good position to be in. Thanks!
@z0r, the thing is, it seems image is not always in GPU memory. And even if so, with current design we can not have image in GPU and not in CPU memory. Not as if it's not possible to support, but that's rateher huge project..
Change in image cache mechanism was mainly caused by image sequences never frees the memory. For example, if you'll open log image sequence, set it up as a 3D viepwort background and start playback you'll run out of memory sooner or later. With new cache mechanism old image frames will be dropped from memory.
Not sure whether it was ever a problem in GE? As in, with old cache (when images were never removed from the memory) were there any out-of-memory issues or so?