Geometry Nodes: Speedup of Shortest Edge Paths node #114707

Merged
Hans Goudey merged 6 commits from mod_moder/blender:tmp_speedup_shortest_edge_paths_better_cache into main 2023-12-18 20:32:25 +01:00

Speedup of node Shortest Edge Paths node by creating
array for other_edge_vert's and computing them in parallel separate loop.
This also provide better CPU cache by avoiding reading
edges in main loop to deduce other vertex (which happen multiple time for each vertex).

For cuboid with 700x700x700 points and 0.066667% random selection
of Edge Vertex this will change 1012.4 ms -> 618.9 ms in shortest_paths function.

Speedup of node Shortest Edge Paths node by creating array for other_edge_vert's and computing them in parallel separate loop. This also provide better CPU cache by avoiding reading edges in main loop to deduce other vertex (which happen multiple time for each vertex). For cuboid with `700`x`700`x`700` points and `0.066667%` random selection of `Edge Vertex` this will change `1012.4 ms` -> `618.9 ms` in `shortest_paths` function.
Iliya Katushenock added the
Interest
Geometry Nodes
label 2023-11-10 15:12:14 +01:00
Iliya Katushenock added 1 commit 2023-11-10 15:12:27 +01:00
Iliya Katushenock added this to the Nodes & Physics project 2023-11-10 15:13:40 +01:00
Iliya Katushenock requested review from Hans Goudey 2023-11-10 15:19:00 +01:00
Iliya Katushenock added 1 commit 2023-11-10 15:31:32 +01:00
Iliya Katushenock added 1 commit 2023-11-10 15:54:17 +01:00
Iliya Katushenock added 2 commits 2023-11-14 13:20:25 +01:00
Hans Goudey added 1 commit 2023-12-18 20:26:40 +01:00
Hans Goudey approved these changes 2023-12-18 20:29:00 +01:00
Hans Goudey left a comment
Member

I observed a nice speedup too. Increasing memory usage is unfortunate, but it seems worth it given the numbers.

BEFORE: Timer 'shortest_paths': (Average: 829.38 ms, Min: 801.75 ms, Last: 809.16 ms)
AFTER:  Timer 'shortest_paths': (Average: 524.19 ms, Min: 513.52 ms, Last: 540.66 ms)
I observed a nice speedup too. Increasing memory usage is unfortunate, but it seems worth it given the numbers. ``` BEFORE: Timer 'shortest_paths': (Average: 829.38 ms, Min: 801.75 ms, Last: 809.16 ms) AFTER: Timer 'shortest_paths': (Average: 524.19 ms, Min: 513.52 ms, Last: 540.66 ms) ```
Hans Goudey merged commit c106066900 into main 2023-12-18 20:32:25 +01:00
Iliya Katushenock deleted branch tmp_speedup_shortest_edge_paths_better_cache 2023-12-19 04:33:31 +01:00
Sign in to join this conversation.
No reviewers
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 Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Reference: blender/blender#114707
No description provided.