binpash / binpash/pash

Avoiding compilation overhead in fragments where compilation is doomed to fail

Open
#549 0 comments 0 reactions 0 assignees View on GitHub
enhancement good first issue!
Dominant language
Shell
Stars
601
Forks
52
PR merge metrics
No merged PRs in 30d

Description

It would be great if PaSh could determine (using profiling) that a fragment that failed can never succeed in a different loop iteration, for example if the fragment:
- uses a non-pure command, then there is no way it will succeed in a later iteration
- does not depend on a file (e.g., just `echo`) and takes a small time/cannot be parallelized even if pure
- ...

Adding new conditions should be pretty simple, the main complexity is designing the mechanism that avoids going to PaSh mode.

Then it could set an environment variable to completely avoid going to pash mode when in that fragment. This could reduce PaSh's overhead significantly, especially in loops that are the biggest source of PaSh overhead at the moment.

Contributor guide

No contributing guide indexed for this repository

Research direction

The issue names no files, tests, or entry points. Start by locating fragment retry behavior and the mechanism that enters PaSh mode, then investigate how profiling could record fragments that cannot succeed in later loop iterations. Done means qualifying fragments set an environment variable or equivalent state that avoids PaSh mode and reduces loop overhead, with coverage for non-pure and non-parallelizable cases.

Written by the indexing model from the issue text.

Assessment

Tech stack
shell
Domain
performance
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.