Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeroen Bakker <jbakker>2021-09-24 09:39:58 +0300
committerJeroen Bakker <jeroen@blender.org>2021-09-24 09:41:40 +0300
commitfc7beac8d6f45d9eca344ec4ae8879c2e73f0731 (patch)
tree25017e4d06a859a1513cdbecaf05e036a9fc4182 /source/blender/blenloader/BLO_readfile.h
parent6a88f83d679f281d7adb3798ab4770069a63c2da (diff)
FileBrowser: Reduce Overhead Browsing Libraries.
When Browsing libraries the asset files were opened multiple times. once to determine the needed groups to query and once for each group to query the items in the group. For file browsing this makes sense but for asset browsing this can be reduced. This patch will load the asset files recursively and only opens them once. Another change is that only the assets are requested and not filtered out later in the process. This patch is needed to simplify the library indexing. Where we need access to the full library content. ## The numbers ## Benchmarked by adding scenes of the spring open movie to the default asset library. Refreshing the asset library would recursively load all the files there. | **8bc27c508a** | Processed 317 'directories/libraries' | 7.573986s | | **Patch** | Processed 42 'directories/libraries' | 0.821013s | {F10442811} Reviewed By: mont29, Severin Maniphest Tasks: T91406 Differential Revision: https://developer.blender.org/D12499
Diffstat (limited to 'source/blender/blenloader/BLO_readfile.h')
-rw-r--r--source/blender/blenloader/BLO_readfile.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/source/blender/blenloader/BLO_readfile.h b/source/blender/blenloader/BLO_readfile.h
index c8615545df9..4b4311d32bf 100644
--- a/source/blender/blenloader/BLO_readfile.h
+++ b/source/blender/blenloader/BLO_readfile.h
@@ -168,9 +168,8 @@ struct LinkNode *BLO_blendhandle_get_datablock_names(BlendHandle *bh,
const bool use_assets_only,
int *r_tot_names);
-struct LinkNode *BLO_blendhandle_get_datablock_info(BlendHandle *bh,
- int ofblocktype,
- int *r_tot_info_items);
+struct LinkNode * /*BLODataBlockInfo */ BLO_blendhandle_get_datablock_info(
+ BlendHandle *bh, int ofblocktype, const bool use_assets_only, int *r_tot_info_items);
struct LinkNode *BLO_blendhandle_get_previews(BlendHandle *bh, int ofblocktype, int *r_tot_prev);
struct PreviewImage *BLO_blendhandle_get_preview_for_id(BlendHandle *bh,
int ofblocktype,