Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to disable variable copying in Jint engine #6320

Merged
merged 6 commits into from
Jan 22, 2025

Conversation

sfmskywalker
Copy link
Member

@sfmskywalker sfmskywalker commented Jan 21, 2025

Introduce a DisableVariableCopying option to improve performance by preventing workflow variables from being copied into the Jint engine or back into the workflow context. Updated related logic to honor this setting and ensure compatibility with existing behavior.


This change is Reviewable

Introduce a `DisableVariableCopying` option to improve performance by preventing workflow variables from being copied into the Jint engine or back into the workflow context. Updated related logic to honor this setting and ensure compatibility with existing behavior.
Updated the `disableVariableCopying` flag to `false` in `Program.cs`. This change allows variables to be copied, potentially addressing scenarios where variable duplication is needed. Ensure to test for any side effects this might introduce.
Enhanced `ActivityOutputRegister` with dictionary-based lookups for improved performance and added unique key generation methods to efficiently retrieve outputs.
Replaced default value assignments with null for clarity and simplicity. Refactored ActivityOutputRegister to optimize record storage and retrieval using grouped dictionary entries instead of flat lists. Adjusted related methods to improve performance and maintain consistency.
Updated the method to safely access the `Value` property when retrieving the first record, preventing potential null reference exceptions. This ensures more robust and error-free behavior when querying output records.
Resolved unnecessary whitespace issues and adjusted spacing around conditional statements to improve code readability and maintain consistency. These changes do not alter functionality but enhance the code's clarity and professional formatting.
@sfmskywalker sfmskywalker merged commit f67d969 into vnext Jan 22, 2025
5 checks passed
@sfmskywalker sfmskywalker deleted the perf/js-variables branch January 22, 2025 09:25
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