Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(940)

Issue 13271043: Fix for #36387, User Preferences "Addons" panel bogs down the whole interface. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 8 months ago by lukas.toenne1
Modified:
10 years, 8 months ago
Reviewers:
ideasman42, bf-codereview
Base URL:
https://svn.blender.org/svnroot/bf-blender/trunk/blender/
Visibility:
Public.

Description

The addons panel draw function calls addon_utils.modules() which in turn retrieves a list of fake modules from the script paths every time. This can become costly when network paths are included for addons. Solution is to put the scanning process into a dedicated function and disable it in frequently called draw and filter functions, i.e. in these cases the cached addons_fake_modules list will be used instead. In order to ensure a valid list of addon modules in most cases when script paths are changed or addons get installed manually the used preferences now have a "scan_addons" flag which forces a one-time rescan of the addon modules. Note that this does not cover cases where addons get added or deleted manually outside Blender, for such cases there is now also an explicit "Scan" operator button in the addons UI.

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+51 lines, -10 lines) Patch
intern/tools/bpy_introspect_ui.py View 1 chunk +2 lines, -1 line 0 comments Download
release/scripts/modules/addon_utils.py View 2 chunks +6 lines, -1 line 0 comments Download
release/scripts/modules/bl_i18n_utils/utils.py View 1 chunk +1 line, -1 line 0 comments Download
release/scripts/startup/bl_operators/wm.py View 5 chunks +17 lines, -4 lines 0 comments Download
release/scripts/startup/bl_ui/__init__.py View 1 chunk +3 lines, -1 line 0 comments Download
release/scripts/startup/bl_ui/space_userpref.py View 2 chunks +4 lines, -2 lines 0 comments Download
source/blender/blenkernel/intern/blender.c View 1 chunk +1 line, -0 lines 0 comments Download
source/blender/editors/interface/resources.c View 1 chunk +3 lines, -0 lines 0 comments Download
source/blender/makesdna/DNA_userdef_types.h View 1 chunk +3 lines, -0 lines 0 comments Download
source/blender/makesrna/intern/rna_userdef.c View 3 chunks +11 lines, -0 lines 0 comments Download

Messages

Total messages: 2
lukas.toenne1
10 years, 8 months ago (2013-08-27 07:49:39 UTC) #1
ideasman42
10 years, 8 months ago (2013-08-27 11:51:45 UTC) #2
checked over the patch, in general looks good.

Main issue is I wouldn't touch DNA, think this makes it unnecessarily
complicated and would even accept changes to script paths not updating until
blender is restarted. (or users runs the operator) not ideal, but I would prefer
this to adding any DNA/rna changes.


Also I'd prefer the verb `refresh` rather then `scan`.

* rename WM_OT_addon_scan --> WM_OT_addon_refresh
* addon_utils.scan_modules --> addon_utils.modules_refresh
* def modules(... scan=True),  --> refresh=True
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b