Performance issue: Active Object (with a group) drops viewport fps
Closed, InvalidPublic


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)


¿? (edtion) added a project: Animation.
Philipp Oeser (lichtwerk) triaged this task as Incomplete priority.Fri, Jan 26, 7:35 PM

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

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

t = Timer(10.0, print_result)


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)

¿? (edtion) closed this task as Invalid.Fri, Jan 26, 9:21 PM
¿? (edtion) claimed this task.

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 addon, which does a check for the active object (and having a group), then does something with that data:

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
			for group in bpy.context.active_object.users_group:
				group.vs.selected_item = group.objects.values().index(bpy.context.active_object)
			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.

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...)