appsmith icon indicating copy to clipboard operation
appsmith copied to clipboard

chore: store value perf

Open arunvjn opened this issue 3 years ago • 43 comments

Description

Batch store ops (storeValue, removeValue and clearStore) requests for performance. Existing implementation of these store functions make a request to the main thread per invocation. All occurrences of store functions are now batched and sent together.

Code changes.

  • Removed store fns from the current implementation of "Promisified" action.
  • All store function now resolves immediately to keep it backward compatible.
  • Introduced TriggerCollector(could be renamed in the subsequent PRs) class which batches all store operations and sends one request once the call stack.
  • Remove transient and persistent store from appsmith store. All store updates will now be under one key.

Fixes #14760

Type of change

  • Perf optimisation

How Has This Been Tested?

  • Manual
  • Jest

Test Plan

Add Testsmith test cases links that relate to this PR

Issues raised during DP testing

Link issues raised during DP testing for better visiblity and tracking (copy link from comments dropped on this PR)

Checklist:

Dev activity

  • [ ] My code follows the style guidelines of this project
  • [ ] I have performed a self-review of my own code
  • [ ] I have commented my code, particularly in hard-to-understand areas
  • [ ] I have made corresponding changes to the documentation
  • [ ] My changes generate no new warnings
  • [ ] I have added tests that prove my fix is effective or that my feature works
  • [ ] New and existing unit tests pass locally with my changes
  • [ ] PR is being merged under a feature flag

QA activity:

  • [ ] Test plan has been approved by relevant developers
  • [ ] Test plan has been peer reviewed by QA
  • [ ] Cypress test cases have been added and approved by either SDET or manual QA
  • [ ] Organized project review call with relevant stakeholders after Round 1/2 of QA
  • [ ] Added Test Plan Approved label after reveiwing all Cypress test

arunvjn avatar Dec 27 '22 10:12 arunvjn

/ok-to-test sha=a0306cb

arunvjn avatar Dec 27 '22 10:12 arunvjn

Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/3786856974. Workflow: Appsmith External Integration Test Workflow. Commit: a0306cb. PR: 19247. Perf tests will be available at https://app.appsmith.com/app/performance-infra-dashboard/pr-details-638dd7cd2913ba43778b915e?pr=19247&runId=3786856974_1

github-actions[bot] avatar Dec 27 '22 10:12 github-actions[bot]

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
appsmith ✅ Ready (Inspect) Visit Preview Jan 10, 2023 at 3:18AM (UTC)

vercel[bot] avatar Dec 27 '22 10:12 vercel[bot]

/ok-to-test sha=1465f5e

arunvjn avatar Dec 27 '22 13:12 arunvjn

Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/3787845570. Workflow: Appsmith External Integration Test Workflow. Commit: 1465f5e. PR: 19247. Perf tests will be available at https://app.appsmith.com/app/performance-infra-dashboard/pr-details-638dd7cd2913ba43778b915e?pr=19247&runId=3787845570_1

github-actions[bot] avatar Dec 27 '22 13:12 github-actions[bot]

The following are new failures, please fix them before merging the PR cypress/integration/Smoke_TestSuite/ClientSideTests/ActionExecution/ClearStore_spec.ts cypress/integration/Smoke_TestSuite/ClientSideTests/ActionExecution/RemoveValue_spec.ts cypress/integration/Smoke_TestSuite/ClientSideTests/Binding/autocomplete_spec.js cypress/integration/Smoke_TestSuite/ClientSideTests/BugTests/DatasourceSchema_spec.ts cypress/integration/Smoke_TestSuite/ClientSideTests/Git/GitSync/GitSyncedApps_spec.js cypress/integration/Smoke_TestSuite/ClientSideTests/IDE/MaintainContext&Focus_spec.js

github-actions[bot] avatar Dec 27 '22 14:12 github-actions[bot]

/ok-to-test sha=7a9df75

arunvjn avatar Dec 28 '22 03:12 arunvjn

Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/3791572901. Workflow: Appsmith External Integration Test Workflow. Commit: 7a9df75. PR: 19247. Perf tests will be available at https://app.appsmith.com/app/performance-infra-dashboard/pr-details-638dd7cd2913ba43778b915e?pr=19247&runId=3791572901_1

github-actions[bot] avatar Dec 28 '22 03:12 github-actions[bot]

/ok-to-test sha=66f6860

arunvjn avatar Dec 30 '22 09:12 arunvjn

Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/3805900297. Workflow: Appsmith External Integration Test Workflow. Commit: 66f6860. PR: 19247. Perf tests will be available at https://app.appsmith.com/app/performance-infra-dashboard/pr-details-638dd7cd2913ba43778b915e?pr=19247&runId=3805900297_1

github-actions[bot] avatar Dec 30 '22 09:12 github-actions[bot]

/ok-to-test sha=6d7f699

arunvjn avatar Dec 30 '22 09:12 arunvjn

Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/3805980527. Workflow: Appsmith External Integration Test Workflow. Commit: 6d7f699. PR: 19247. Perf tests will be available at https://app.appsmith.com/app/performance-infra-dashboard/pr-details-638dd7cd2913ba43778b915e?pr=19247&runId=3805980527_1

github-actions[bot] avatar Dec 30 '22 09:12 github-actions[bot]

/ok-to-test sha=be5f49b

arunvjn avatar Dec 30 '22 10:12 arunvjn

Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/3806179343. Workflow: Appsmith External Integration Test Workflow. Commit: be5f49b. PR: 19247. Perf tests will be available at https://app.appsmith.com/app/performance-infra-dashboard/pr-details-638dd7cd2913ba43778b915e?pr=19247&runId=3806179343_1

github-actions[bot] avatar Dec 30 '22 10:12 github-actions[bot]

/ok-to-test sha=64c8782

arunvjn avatar Dec 30 '22 12:12 arunvjn

Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/3806931630. Workflow: Appsmith External Integration Test Workflow. Commit: 64c8782. PR: 19247. Perf tests will be available at https://app.appsmith.com/app/performance-infra-dashboard/pr-details-638dd7cd2913ba43778b915e?pr=19247&runId=3806931630_1

github-actions[bot] avatar Dec 30 '22 12:12 github-actions[bot]

/ok-to-test sha=9e85f7b

arunvjn avatar Dec 30 '22 13:12 arunvjn

Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/3806987290. Workflow: Appsmith External Integration Test Workflow. Commit: 9e85f7b. PR: 19247. Perf tests will be available at https://app.appsmith.com/app/performance-infra-dashboard/pr-details-638dd7cd2913ba43778b915e?pr=19247&runId=3806987290_1

github-actions[bot] avatar Dec 30 '22 13:12 github-actions[bot]

/ok-to-test sha=4c44bad

arunvjn avatar Jan 02 '23 05:01 arunvjn

Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/3820454165. Workflow: Appsmith External Integration Test Workflow. Commit: 4c44bad. PR: 19247. Perf tests will be available at https://app.appsmith.com/app/performance-infra-dashboard/pr-details-638dd7cd2913ba43778b915e?pr=19247&runId=3820454165_1

github-actions[bot] avatar Jan 02 '23 05:01 github-actions[bot]

/ok-to-test sha=bb6ebee

arunvjn avatar Jan 02 '23 07:01 arunvjn

Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/3821020007. Workflow: Appsmith External Integration Test Workflow. Commit: bb6ebee. PR: 19247. Perf tests will be available at https://app.appsmith.com/app/performance-infra-dashboard/pr-details-638dd7cd2913ba43778b915e?pr=19247&runId=3821020007_1

github-actions[bot] avatar Jan 02 '23 07:01 github-actions[bot]

/ok-to-test sha=99fe92a

arunvjn avatar Jan 02 '23 09:01 arunvjn

Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/3821486447. Workflow: Appsmith External Integration Test Workflow. Commit: 99fe92a. PR: 19247. Perf tests will be available at https://app.appsmith.com/app/performance-infra-dashboard/pr-details-638dd7cd2913ba43778b915e?pr=19247&runId=3821486447_1

github-actions[bot] avatar Jan 02 '23 09:01 github-actions[bot]

/ok-to-test sha=3de9faa

arunvjn avatar Jan 02 '23 10:01 arunvjn

Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/3821774866. Workflow: Appsmith External Integration Test Workflow. Commit: 3de9faa. PR: 19247. Perf tests will be available at https://app.appsmith.com/app/performance-infra-dashboard/pr-details-638dd7cd2913ba43778b915e?pr=19247&runId=3821774866_1

github-actions[bot] avatar Jan 02 '23 10:01 github-actions[bot]

The following are new failures, please fix them before merging the PR

github-actions[bot] avatar Jan 02 '23 10:01 github-actions[bot]

/ok-to-test sha=9705c38

arunvjn avatar Jan 02 '23 11:01 arunvjn

Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/3822140128. Workflow: Appsmith External Integration Test Workflow. Commit: 9705c38. PR: 19247. Perf tests will be available at https://app.appsmith.com/app/performance-infra-dashboard/pr-details-638dd7cd2913ba43778b915e?pr=19247&runId=3822140128_1

github-actions[bot] avatar Jan 02 '23 11:01 github-actions[bot]

/ok-to-test sha=cf2ef44

arunvjn avatar Jan 02 '23 11:01 arunvjn