Skip to content

Improve performance on path manipulation nodes#3167

Open
Alxiice wants to merge 3 commits into
developfrom
feat/path_nodes
Open

Improve performance on path manipulation nodes#3167
Alxiice wants to merge 3 commits into
developfrom
feat/path_nodes

Conversation

@Alxiice

@Alxiice Alxiice commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Description

  • Add a node GetFileExtension
  • Replace desc.Node by desc.CommandLineNode on
    • GetParentFolder
    • FlattenFiles
    • PathJoin

Using CommandLineNode bypass the _processInIsolatedEnvironment call (see #3166) that launches a subprocess.
Bypassing it saves several seconds: the node compute takes almost 0 sec.

@Alxiice Alxiice self-assigned this Jul 13, 2026
@Alxiice Alxiice added the feature new feature (proposed as PR or issue planned by dev) label Jul 13, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request refactors several utility nodes (FlattenFiles, GetParentFolder, and PathJoin) to inherit from desc.CommandLineNode instead of desc.Node, transitioning their execution logic from process to processChunk. It also introduces a new GetFileExtension node. The feedback suggests adding a defensive check in the new GetFileExtension node to prevent a potential TypeError if the input path is empty or None.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread meshroom/nodes/general/GetFileExtension.py Outdated
@codecov

codecov Bot commented Jul 13, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 83.33333% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 86.07%. Comparing base (1d89d80) to head (17cafa3).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
meshroom/core/desc/node.py 83.33% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #3167      +/-   ##
===========================================
- Coverage    86.07%   86.07%   -0.01%     
===========================================
  Files           78       78              
  Lines        12111    12115       +4     
===========================================
+ Hits         10425    10428       +3     
- Misses        1686     1687       +1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@fabiencastan fabiencastan left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do not use commandlinenode for that. This is hack. Add a way to disable subprocess in Node.

@Alxiice

Alxiice commented Jul 15, 2026

Copy link
Copy Markdown
Contributor Author

@fabiencastan I added a InlineNode type (we can discuss about the name). I found that was a simpler way to avoid computing inside the current env (rather than modifying the whole graph compute / process system).

@Alxiice
Alxiice requested a review from fabiencastan July 15, 2026 16:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature new feature (proposed as PR or issue planned by dev)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants