Skip to content

feat: optimize top level operations - #1056

Merged
josephjclark merged 2 commits into
ignore-top-object-add-importfrom
optimise-top-level-operations
Oct 9, 2025
Merged

josephjclark merged 2 commits into
ignore-top-object-add-importfrom
optimise-top-level-operations

Conversation

@doc-han

@doc-han doc-han commented Oct 9, 2025

Copy link
Copy Markdown
Collaborator

Use openfn compile --trace## Short Description

Optimizes the tranform top-level-operations by visiting just the Program node.

Fixes #

Implementation Details

A more detailed breakdown of the changes, including motivations (if not provided in the issue).

QA Notes

List any considerations/cases/advice for testing/QA here.

AI Usage

Please disclose how you've used AI in this work (it's cool, we just want to know!):

  • Code generation (copilot but not intellisense)
  • Learning or fact checking
  • Strategy / design
  • Optimisation / refactoring
  • Translation / spellchecking / doc gen
  • Other
  • I have not used AI

You can read more details in our Responsible AI Policy

Release branch checklist

Delete this section if this is not a release PR.

If this IS a release branch:

  • Run pnpm changeset version from root to bump versions
  • Run pnpm install
  • Commit the new version numbers
  • Run pnpm changeset tag to generate tags
  • Push tags git push --tags

Tags may need updating if commits come in after the tags are first generated.

@github-project-automation github-project-automation Bot moved this to New Issues in Core Oct 9, 2025
@doc-han

doc-han commented Oct 9, 2025

Copy link
Copy Markdown
Collaborator Author

The addition of the operations key on the Program node was messing with me. resolved now.

@doc-han

doc-han commented Oct 9, 2025

Copy link
Copy Markdown
Collaborator Author

Output (reduces time spent on top-level-operations)

[pre acorn parse] Used heap at 53.16mb
[post acorn parse] Used heap at 134.69mb

[transformer lazy-state] Used heap at 183.13mb
transformer lazy-state: 85.56ms

[transformer promises] Used heap at 231.91mb
transformer promises: 90.951ms

[transformer ensure-exports] Used heap at 231.94mb
transformer ensure-exports: 0.647ms

[transformer top-level-operations] Used heap at 231.96mb
transformer top-level-operations: 0.329ms

[transformer add-imports] Used heap at 231.98mb
transformer add-imports: 0.199ms

@josephjclark
josephjclark merged commit 5a277cf into ignore-top-object-add-import Oct 9, 2025
6 checks passed
@github-project-automation github-project-automation Bot moved this from New Issues to Done in Core Oct 9, 2025
@josephjclark
josephjclark deleted the optimise-top-level-operations branch October 1, 2026 15:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants