Lag when changing bool custom property

Hi all blenderartists :slight_smile:

I got a little puzzle to solve:
I’m developing game export/import filter and on the way to go i had to create my own custom properties
and using them in panels.
So I created one bool property on scene:

bpy.types.Scene.scs_incl_col = bpy.props.BoolProperty( name="Include collisions",
description = "By showing variant show also it's collisions",
default=True)

After that I’m using it in custom panel placed in PROPERTIES scene area like that:

box = layout.box()
row = box.row()
row.prop(context.scene, "scs_incl_col", text="Include Collisions")

Now when i import model, show it in GLSL mode (GLSL because i need support for multiple layered textures)
and then try to switch my property on panel, it takes like few seconds for property to update.
But when i’m changing property in python console it goes smooth no lag.

Now i’m asking my self two days already what should i do about that lag. It’s a bit annoying switching some
bool property which actually doesn’t do nothing to 3d view but it still wants to refresh whole scene.
Is there any way to disable scene redraw on property change?
Or to which type i should paste this property to use it in custom operators?

Thx for replies and discussion,
notallowed

is this property only important at import?

Actually it tells blender if show collisions of model when switching different variants of model.
So no, i need this property when user will be editing model in blender.
Also i am using operator properties when importing but that’s not the case i want.

I was thinking about attaching this property to different type but i guess that doesn’t solve my problem?
Also what tells blender to redraw scene? As i said that when i’m switching property in python console scene is not reloaded

To be clear, which are you saying:

When you tick/untick the checkmark box in the GUI:

  1. The checkmark itself takes a few seconds to show up.

  2. It takes a few seconds before querying the property gives the right value.

I think (1) would indicate that a scene refresh is being invoked, which I don’t think should happen, unless you are using a handler to update the scene after any element is changed. Are you using a handler?

Does Blender lock up (i.e. freeze out your user interaction) for a few seconds after clicking the checkmark?