FBX IO: Search for images on separate threads #105125
No reviewers
Labels
No Label
Interest
Animation & Rigging
Interest
Blender Cloud
Interest
Collada
Interest
Core
Interest
Documentation
Interest
Eevee & Viewport
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
Import and Export
Interest
Modeling
Interest
Modifiers
Interest
Nodes & Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds, Tests & Devices
Interest
Python API
Interest
Rendering & Cycles
Interest
Sculpt, Paint & Texture
Interest
Translations
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Meta
Good First Issue
Meta
Papercut
Module
Add-ons (BF-Blender)
Module
Add-ons (Community)
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
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender-addons#105125
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "Mysteryem/blender-addons:fbx_import_image_search_threaded"
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?
This offloads IO work to find image files into separate threads.
Texture loading is moved to the start of FBX import so that the rest of
the fbx import can continue while searching for images runs in the
background.
This can reduce import times when the Image Search option of the
importer is enabled (it is enabled by default) and an imported file has
images with paths that cause a search to begin in a directory with many
nested subdirectories, which can happen when a relative path goes up
many parent directories, the relative path starting with "../../../" or
similar.
While not as common, this can also reduce import times when an imported
file references many images with file paths that start with the same
drive letter as a slower drive, such as a CD drive, or when an imported
file references an image on a drive that has been powered off due to
inactivity.
Aside from these cases, import times are expected to be the same or
slightly slower, likely due to the time spent starting threads or due to
each thread contending for the GIL for its parts that don't release the
GIL.
The implementation uses
ThreadPoolExecutor
andFuture
objects fromconcurrent.futures
. While unlikely, to account forconcurrent.futures
not being available, simpleExecutor
andFuture
implementations are added to fbx_utils_threading.py.
The attached .fbx contains reference to a texture with a RelativeFilename of
"..\\..\\..\\..\\..\\..\\..\\512test.png"
. This PR won't do much to the import of this specific file because it's just a default cube, but the idea of the PR is that the rest of the import can continue while the image search continues in the background.513ef96e52
to6518667f71
WIP: FBX IO: Search for images on separate threadsto FBX IO: Search for images on separate threadsexecutor
argument for import_fbx.load() f9f3507c6cCheckout
From your project repository, check out a new branch and test the changes.