-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Description:
Currently, FunGT loads models sequentially via Model::load(). Loading multiple large models (like Pixar assets) can block the main thread and result in noticeable delays. To improve performance and scalability, we should implement a hybrid parallel model loader similar to Blender and modern game engines.
Proposed Solution:
-
Internal parallelism inside
Model::load()- Use Intel TBB (
tbb::parallel_for) to process meshes, materials, and textures within a single model. - This speeds up loading large individual models.
- Use Intel TBB (
-
External model loading manager
- Create a
ModelLoaderclass or task queue to handle multiple models concurrently. - Allows users to enqueue multiple models without manually spawning threads.
- Provides methods like
waitForAll()or progress tracking.
- Create a
-
GPU synchronization
- Keep GPU buffer creation on the main thread to ensure thread safety with OpenGL.
- CPU parsing and data preparation remain parallel.
Benefits:
- Fast loading of large individual models.
- Allows multiple models to load concurrently without user pain.
- Mirrors Blender and game engine best practices.
Optional Enhancements:
- Lazy loading / streaming for very large assets.
- Limit concurrency via TBB task arena to prevent oversubscription.
References / Inspiration:
- Blender: Uses TBB for dependency graph, physics, modifiers, and asset import.
- Game engines (Unreal, Unity, Godot): Separate CPU parse and GPU upload; job/task systems for async model loading.
Suggested Labels:
enhancementperformancetbbmodel-loading
Suggested Milestone:
v1.2(or next performance-focused release)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels