PromucFlow_constructor/app/client/src/sagas
Diljit abb0878388
chore: optimise first evaluation by adding worker scope cache (CE) (#38068)
## Description
- Add evalContextCache to reduce the number of times the evalContext is created from the contextTree
- remove resetWorkerGlobalScope execution before every evalSync
- Instantiate the evalWorker in src/index.tsx


Fixes #`Issue Number`  
_or_  
Fixes `Issue URL`
> [!WARNING]  
> _If no issue exists, please create an issue first, and check with the
maintainers if the issue is valid._

## Automation

/ok-to-test tags="@tag.All"

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!TIP]
> 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/12295048843>
> Commit: 04b1e859b02282ba9efa96aea25acc9f20098061
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=12295048843&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.All`
> Spec:
> <hr>Thu, 12 Dec 2024 12:21:04 UTC
<!-- end of auto-generated comment: Cypress test results  -->


## Communication
Should the DevRel and Marketing teams inform users about this change?
- [ ] Yes
- [ ] No


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
- Introduced a new property `actionNames` to enhance action tracking
within JavaScript action entities.
- Added a new feature flag `release_evaluation_scope_cache` for improved
feature management.
- Implemented a new function `isPropertyAnEntityAction` to identify
action properties in JavaScript entities.
- Enhanced the `loadAppEntities` method to improve JavaScript library
loading processes.
- Updated the evaluation context initialization process to utilize
`getDataTreeContext`.
- Expanded the `WIDGET_CONFIG_MAP` to include detailed configurations
for various widget types.

- **Bug Fixes**
- Enhanced error handling for unsafe function calls in evaluation logic.
- Improved error handling and logging for library installation and
uninstallation processes.

- **Tests**
- Expanded test coverage for action bindings and dependencies in the
`DataTreeEvaluator`.
- Updated tests to validate the new `actionNames` property and its
integration.
- Modified tests to ensure correct functionality of the `evaluateSync`
function.
- Added new test cases to assess the behavior of the evaluator with
widget updates.

- **Chores**
- Streamlined imports and initialization of worker instances across
various files.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-12-13 09:44:19 +05:30
..
__tests__ chore: add blank line eslint rule (#36369) 2024-09-18 19:35:28 +03:00
ActionExecution chore: optimise first evaluation by adding worker scope cache (CE) (#38068) 2024-12-13 09:44:19 +05:30
autoHeightSagas chore: add blank line eslint rule (#36369) 2024-09-18 19:35:28 +03:00
BuildingBlockSagas chore: add blank line eslint rule (#36369) 2024-09-18 19:35:28 +03:00
CanvasSagas chore: add blank line eslint rule (#36369) 2024-09-18 19:35:28 +03:00
PartialImportExportSagas chore: add blank line eslint rule (#36369) 2024-09-18 19:35:28 +03:00
PasteWidgetUtils chore: delete unused code (#36461) 2024-09-23 13:52:00 +03:00
WebsocketSagas chore: Remove socket-io and websocket connections (#37784) 2024-11-28 10:58:56 +05:30
ActionSagas.ts chore: add new ADD_ACTION blueprint operation type (#37078) 2024-10-25 12:00:34 +03:00
AnalyticsSaga.ts fix: change appsmith alias (#35349) 2024-08-06 17:52:22 +03:00
ApiPaneSagas.ts fix: API Body format focus retention (#37150) 2024-11-01 11:24:49 +05:30
AppThemingSaga.tsx chore: Refactor API (#36412) 2024-09-25 16:29:21 +05:30
AutoLayoutUpdateSagas.tsx chore: add blank line eslint rule (#36369) 2024-09-18 19:35:28 +03:00
BatchSagas.tsx chore: add blank line eslint rule (#36369) 2024-09-18 19:35:28 +03:00
CommunityTemplatesSagas.tsx chore: add blank line eslint rule (#36369) 2024-09-18 19:35:28 +03:00
CurlImportSagas.ts chore: Migrate sub components into Plugin Action Editor (#36844) 2024-10-16 18:29:10 +05:30
DatasourcesSagas.ts chore: Updating generate page interaction to show it in a modal following the IDE 2.0 interaction pattern (#37414) 2024-11-19 12:05:10 +05:30
DebuggerSagas.ts chore: Debugger Quick wins (#37954) 2024-12-10 14:43:40 +00:00
editorContextSagas.ts chore: add blank line eslint rule (#36369) 2024-09-18 19:35:28 +03:00
ErrorSagas.tsx chore: Refactor API (#36412) 2024-09-25 16:29:21 +05:30
EvalErrorHandler.ts chore: add blank line eslint rule (#36369) 2024-09-18 19:35:28 +03:00
EvaluationsSaga.test.ts chore: optimise first evaluation by adding worker scope cache (CE) (#38068) 2024-12-13 09:44:19 +05:30
EvaluationsSaga.ts chore: optimise first evaluation by adding worker scope cache (CE) (#38068) 2024-12-13 09:44:19 +05:30
EvaluationsSagaUtils.test.ts chore: add blank line eslint rule (#36369) 2024-09-18 19:35:28 +03:00
EvaluationsSagaUtils.ts chore: add blank line eslint rule (#36369) 2024-09-18 19:35:28 +03:00
EvalWorkerActionSagas.ts chore: optimise first evaluation by adding worker scope cache (CE) (#38068) 2024-12-13 09:44:19 +05:30
FocusRetentionSaga.ts chore: add blank line eslint rule (#36369) 2024-09-18 19:35:28 +03:00
FormEvaluationSaga.ts chore: add blank line eslint rule (#36369) 2024-09-18 19:35:28 +03:00
getNextEntityAfterRemove.test.ts fix: change appsmith alias (#35349) 2024-08-06 17:52:22 +03:00
GitSyncSagas.ts chore: making autocommit GA (#36347) 2024-09-25 14:32:01 +05:30
GlobalSearchSagas.ts chore: add blank line eslint rule (#36369) 2024-09-18 19:35:28 +03:00
helper.test.ts chore: add blank line eslint rule (#36369) 2024-09-18 19:35:28 +03:00
helper.ts chore: add new ADD_ACTION blueprint operation type (#37078) 2024-10-25 12:00:34 +03:00
IDESaga.tsx chore: add blank line eslint rule (#36369) 2024-09-18 19:35:28 +03:00
InitSagas.ts chore: Add span for measuring performance of consolidated api (#37328) 2024-11-12 11:07:20 +05:30
JSLibrarySaga.ts chore: optimise first evaluation by adding worker scope cache (CE) (#38068) 2024-12-13 09:44:19 +05:30
JSPaneSagas.ts chore: Debugger Quick wins (#37954) 2024-12-10 14:43:40 +00:00
layoutConversionSagas.ts chore: add blank line eslint rule (#36369) 2024-09-18 19:35:28 +03:00
LintingSagas.ts chore: add blank line eslint rule (#36369) 2024-09-18 19:35:28 +03:00
loadGoogleApi.ts chore: add blank line eslint rule (#36369) 2024-09-18 19:35:28 +03:00
ModalSagas.ts chore: add blank line eslint rule (#36369) 2024-09-18 19:35:28 +03:00
NavigationSagas.ts chore: add blank line eslint rule (#36369) 2024-09-18 19:35:28 +03:00
OnboardingSagas.ts chore: add blank line eslint rule (#36369) 2024-09-18 19:35:28 +03:00
OneClickBindingSaga.ts chore: add blank line eslint rule (#36369) 2024-09-18 19:35:28 +03:00
PluginSagas.ts chore: add blank line eslint rule (#36369) 2024-09-18 19:35:28 +03:00
PostEvaluationSagas.ts chore: optimise first evaluation by adding worker scope cache (CE) (#38068) 2024-12-13 09:44:19 +05:30
PostLintingSagas.ts chore: add blank line eslint rule (#36369) 2024-09-18 19:35:28 +03:00
QueryPaneSagas.ts chore: Updating generate page interaction to show it in a modal following the IDE 2.0 interaction pattern (#37414) 2024-11-19 12:05:10 +05:30
RecentEntitiesSagas.ts chore: add blank line eslint rule (#36369) 2024-09-18 19:35:28 +03:00
ReplaySaga.ts chore: Migrate sub components into Plugin Action Editor (#36844) 2024-10-16 18:29:10 +05:30
SaaSPaneSagas.ts chore: Updating generate page interaction to show it in a modal following the IDE 2.0 interaction pattern (#37414) 2024-11-19 12:05:10 +05:30
selectors.tsx chore: add blank line eslint rule (#36369) 2024-09-18 19:35:28 +03:00
SnapshotSagas.ts chore: add blank line eslint rule (#36369) 2024-09-18 19:35:28 +03:00
SnipingModeSaga.test.ts fix: change appsmith alias (#35349) 2024-08-06 17:52:22 +03:00
SnipingModeSagas.ts chore: add blank line eslint rule (#36369) 2024-09-18 19:35:28 +03:00
TemplatesSagas.ts chore: add blank line eslint rule (#36369) 2024-09-18 19:35:28 +03:00
TernSaga.ts chore: add blank line eslint rule (#36369) 2024-09-18 19:35:28 +03:00
ThemeSaga.tsx chore: add blank line eslint rule (#36369) 2024-09-18 19:35:28 +03:00
ToastSagas.ts chore: add blank line eslint rule (#36369) 2024-09-18 19:35:28 +03:00
UtilSagas.ts chore: Cleanup Redux Actions file (#35720) 2024-08-22 09:49:30 +05:30
WidgetAdditionSagas.ts chore: add blank line eslint rule (#36369) 2024-09-18 19:35:28 +03:00
WidgetBlueprintSagas.test.ts fix: jest test failures coz of getIsAnvilLayout (#32664) 2024-04-15 09:17:23 +05:30
WidgetBlueprintSagas.ts chore: add new ADD_ACTION blueprint operation type (#37078) 2024-10-25 12:00:34 +03:00
WidgetDeletionSaga.test.ts fix: Prevent Errors in Debugger When Deleting List Widget (#35820) 2024-08-30 10:38:19 +01:00
WidgetDeletionSagas.ts chore: add blank line eslint rule (#36369) 2024-09-18 19:35:28 +03:00
WidgetEnhancementHelpers.ts chore: add blank line eslint rule (#36369) 2024-09-18 19:35:28 +03:00
WidgetLoadingSaga.ts chore: add blank line eslint rule (#36369) 2024-09-18 19:35:28 +03:00
WidgetOperationSaga.test.tsx chore: add blank line eslint rule (#36369) 2024-09-18 19:35:28 +03:00
WidgetOperationSagas.tsx chore: add blank line eslint rule (#36369) 2024-09-18 19:35:28 +03:00
WidgetOperationUtils.test.ts chore: add blank line eslint rule (#36369) 2024-09-18 19:35:28 +03:00
WidgetOperationUtils.ts chore: add blank line eslint rule (#36369) 2024-09-18 19:35:28 +03:00
WidgetSelectionSagas.ts chore: add blank line eslint rule (#36369) 2024-09-18 19:35:28 +03:00
WidgetSelectUtils.test.ts chore: add blank line eslint rule (#36369) 2024-09-18 19:35:28 +03:00
WidgetSelectUtils.ts chore: add blank line eslint rule (#36369) 2024-09-18 19:35:28 +03:00