Improve thumbnail loading from blend files. #90908

Open
opened 2021-08-25 09:32:12 +02:00 by Jeroen Bakker · 5 comments
Member

Thumbnails are cached in tmp folder but can be outdates or not available. When this is the case the thumbnails are extracted from the blend file.

Currently the logic is as follow

for each thumbnail to load:
  open file
  read all names of the same category
  read all preview images of the same category
  find the preview image that was needed as it is assumed that the name list and preview list are in the same order!
  discard the rest of the preview images (that will probably be reread in the following loop)...

Related functions:

  • IMB_thumb_load_blend
  • BLO_blendhandle_get_previews

Other improvements are:

Thumbnails are cached in tmp folder but can be outdates or not available. When this is the case the thumbnails are extracted from the blend file. Currently the logic is as follow ``` for each thumbnail to load: open file read all names of the same category read all preview images of the same category find the preview image that was needed as it is assumed that the name list and preview list are in the same order! discard the rest of the preview images (that will probably be reread in the following loop)... ``` Related functions: * `IMB_thumb_load_blend` * `BLO_blendhandle_get_previews` Other improvements are: * - [ ] store preview images closer to the bhead. * - [x] [D12312: #90908: Reduce loading times when extracting thumbnails from Blendfiles.](https://archive.blender.org/developer/D12312) * - [ ] add an preview index at the end of the blend file that can act as a hashmap between IDname and preview index. So we don't need to go over the whole file.
Jeroen Bakker self-assigned this 2021-08-25 09:32:12 +02:00
Author
Member

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'
Author
Member

Added subscriber: @Jeroen-Bakker

Added subscriber: @Jeroen-Bakker

This issue was referenced by 0fd1e6a5f4

This issue was referenced by 0fd1e6a5f43df8b0f5382c07975c0d031bbbb506
Member

Added subscriber: @JulianEisel

Added subscriber: @JulianEisel
Member

This is on the In Progress column. One of the points mentioned is done and AFAICS there are no plans to work on the remaining ones soon. So should we move this to the Community Tasks/Good-to-Have's?

This is on the *In Progress* column. One of the points mentioned is done and AFAICS there are no plans to work on the remaining ones soon. So should we move this to the *Community Tasks/Good-to-Have's*?
Jeroen Bakker was unassigned by Sybren A. Stüvel 2021-10-11 14:11:11 +02:00
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
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
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#90908
No description provided.