Skip to content

Conversation

@tarkah
Copy link
Contributor

@tarkah tarkah commented Dec 29, 2025

Edit: This naive implementation doesn't work since it doesn't consider file contents (hash) nor does it consider that tx scoped triggers output their files to the transaction which wont get reused if the trigger is skipped.

A robust solution is needed that caches triggers outputs and links them back into the transaction & "skipping" a trigger would result in us re-using the cached outputs.

Currently moss runs triggers matching _all_ paths
for the new transaction. However, triggers only need
to be run when the matching paths _change_ (added /
removed). We can diff the previous state w/ the current
to produce a list of changed paths to run against
trigger matching.

This will greatly speedup moss it / rm / sync operations
to only run the minimum required triggers on each
run.
@tarkah tarkah marked this pull request as draft December 29, 2025 21:55
@tarkah tarkah changed the title Task/trigger optimization Trigger caching Dec 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants