Repository navigation
feat: Compiler optimisations - #1053
Conversation
|
Perfect, that's exactly what I'm expecting 👍 |
* feat: ignore objects for lazy state * tests: ignore top level object in lazy state
|
Dang, something feels off here. Running this against my (refactored) 1.6mb source file, I'm still seeing 230mb of memory get used up. I can see that the lazy state vistor is exiting early - but there's still too much tree traversal going on. The changes here look good and I'm happy, but we'll need to investigate a bit more before we can declare victory on this particular problem :( |
|
Here's a much better trace output for parsing with the new changes: For the record, here's what it's like without the optimisation: I can see that lazy state and promises have improved - but promises and top level ops are still kinda expensive. You were talking about top level ops @doc-han maybe we do need to look if there's a quick win there |
Use openfn compile --trace
|
@doc-han I think I can see two cheap fixes here:
|
feat: optimize top level operations
feat: ignore top objects in several transforms
Short Description
When running
findAllDanglingIdentifiersin the add-imports transform, we want to ignore top-level object declarations.Fixes #1029
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!):
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:
pnpm changeset versionfrom root to bump versionspnpm installpnpm changeset tagto generate tagsgit push --tagsTags may need updating if commits come in after the tags are first generated.