motia icon indicating copy to clipboard operation
motia copied to clipboard

fix: Performance Improvement

Open ytallo opened this issue 1 month ago • 2 comments

Summary

Related Issues

Type of Change

  • [ ] Bug fix
  • [ ] New feature
  • [ ] Breaking change
  • [ ] Refactor
  • [ ] Other (please describe):

Checklist

  • [ ] I have read the CONTRIBUTING.md
  • [ ] My code follows the code style of this project
  • [ ] I have added tests where applicable
  • [ ] I have tested my changes locally
  • [ ] I have linked relevant issues
  • [ ] I have added screenshots for UI changes (if applicable)

Screenshots (if applicable)

Additional Context


[!NOTE] Caches stream instances, normalizes Buffer-like results, and updates RPC processors to support sync handlers with safer request handling.

  • Core Execution (call-step-file.ts):
    • Cache StreamFactory instances via WeakMap and reuse with getStreamInstance.
    • Build streams from Object.entries and pass to runner payload.
    • Normalize result.body when received as Buffer-like JSON (convert to Buffer).
    • Improve stdout handling: parse likely-JSON logs; otherwise log as text.
  • RPC Processing:
    • Allow RpcHandler to return sync or async; handle now consistently returns a Promise.
    • RpcProcessor and RpcStdinProcessor:
      • Guard when closed; respond with error for unknown methods.
      • Handle both sync and Promise-like handler results without throwing.
      • Add exit/close/disconnect guards and line-based stdin parsing reliability.

Written by Cursor Bugbot for commit 15485da2e3dd4452da2b5b72ffb169a40c82f928. This will update automatically on new commits. Configure here.

ytallo avatar Nov 26 '25 14:11 ytallo

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
motia-docs Ready Ready Preview Comment Dec 3, 2025 11:53pm
motia-ui Ready Ready Preview Comment Dec 3, 2025 11:53pm

vercel[bot] avatar Nov 26 '25 14:11 vercel[bot]

E2E Test Results ❌

All tests have completed. Tests failed.

Matrix: 2 OS (Ubuntu, macOS) × 2 Templates (TypeScript, Python) = 4 jobs

View detailed test results


This comment is automatically posted by the PR E2E Results workflow.

github-actions[bot] avatar Nov 26 '25 14:11 github-actions[bot]