Performance issue: Active Object (with a group) drops viewport fps #53891

Closed
opened 2018-01-24 23:27:36 +01:00 by ¿? · 6 comments

Windows 7 64Bit, GTX 770

40dbf2f / 5bd8ac9 (2.79 stable)

When an object is in a group, if it is the scene's active object, performance will drop.
The object can have a group and be selected without dropping fps but only if it's not in a group.

Here is a scene with two empties, and a monkey with some modifiers (to drop fps to see it)

Bug-Groups-FPS.blend

Windows 7 64Bit, GTX 770 40dbf2f / 5bd8ac9 (2.79 stable) When an object is in a group, if it is the scene's active object, performance will drop. The object can have a group and be selected without dropping fps but only if it's not in a group. Here is a scene with two empties, and a monkey with some modifiers (to drop fps to see it) [Bug-Groups-FPS.blend](https://archive.blender.org/developer/F1972731/Bug-Groups-FPS.blend)
Author

Added subscriber: @Ebone

Added subscriber: @Ebone
Member

Added subscriber: @lichtwerk

Added subscriber: @lichtwerk
Member

Having a hard time reproducing this

tested with a totally dummy script:

import bpy
from threading import Timer

iCount = 0

def framecounter(scene):
    global iCount
    iCount += 1

bpy.app.handlers.frame_change_pre.append(framecounter)

def print_result():
    print("frames %i", iCount)

t = Timer(10.0, print_result)
t.start()

bpy.ops.screen.animation_play()

And all I get from this is very similar results, no matter which empty I have selected.

Could you try if this also happens with factory settings? (File > Load Factory Settings)

Having a hard time reproducing this tested with a totally dummy script: ``` import bpy from threading import Timer iCount = 0 def framecounter(scene): global iCount iCount += 1 bpy.app.handlers.frame_change_pre.append(framecounter) def print_result(): print("frames %i", iCount) t = Timer(10.0, print_result) t.start() bpy.ops.screen.animation_play() ``` And all I get from this is very similar results, no matter which empty I have selected. Could you try if this also happens with factory settings? (File > Load Factory Settings)
Author

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'
¿? closed this issue 2018-01-26 21:21:33 +01:00
¿? self-assigned this 2018-01-26 21:21:33 +01:00
Author

Weird, I don't know what that script is supposed to do.

Anyway, no, I scoured through my addons, and found that there are multiple addons more or less, contributing to the frame drop, however while most are the difference between 62fps and flickering from 58-60, the big culprit dropping it to like 30-40fps/60 is the Source Tools (Valve Importer) addon.

It has a section in it's utils.py addon, which does a check for the active object (and having a group), then does something with that data:

@persistent
def scene_update(scene, immediate=False):
	global need_export_refresh
	global last_export_refresh
	global scene_update_guard

	if bpy.context.active_object:
		scene_update_guard = True
		try:
			for group in bpy.context.active_object.users_group:
				group.vs.selected_item = group.objects.values().index(bpy.context.active_object)
		finally:
			scene_update_guard = False
		..........
	...........
..........

I don't know what it's doing but I do know that I REALLY only need the addon during "import" and whatever this is doing, it's something I really don't need or likely want.
Commenting most of that solves my big problem without breaking anything that I'm aware of.
I'm going to report it to that developer.

Weird, I don't know what that script is supposed to do. Anyway, no, I scoured through my addons, and found that there are multiple addons more or less, contributing to the frame drop, however while most are the difference between 62fps and flickering from 58-60, the big culprit dropping it to like 30-40fps/60 is the Source Tools (Valve Importer) addon. It has a section in it's utils.py addon, which does a check for the active object (and having a group), then does something with that data: ``` @persistent def scene_update(scene, immediate=False): global need_export_refresh global last_export_refresh global scene_update_guard if bpy.context.active_object: scene_update_guard = True try: for group in bpy.context.active_object.users_group: group.vs.selected_item = group.objects.values().index(bpy.context.active_object) finally: scene_update_guard = False .......... ........... .......... ``` I don't know what it's doing but I do know that I REALLY only need the addon during "import" and whatever this is doing, it's something I really don't need or likely want. Commenting most of that solves my big problem without breaking anything that I'm aware of. I'm going to report it to that developer.
Member

Thanx for reporting back.
(That script was just a quick hack to have animation playing for 10secs and report back how many frames actually played...)

Thanx for reporting back. (That script was just a quick hack to have animation playing for 10secs and report back how many frames actually played...)
Sign in to join this conversation.
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
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#53891
No description provided.