PromucFlow_constructor/app/server
Manish Kumar 0b6a0f30af
chore: improving /actions endpoint performance (#22109)
## Description

/actions endpoint has very high response latency, The leading factor for
this latency is the DB calls to collections which have high volume of
data. i.e `actions` and `applications`. This Pr tries to address this by
optimising the flow to reduce db calls wherever possible.

The following strategies have been used to reduce the latency as much as
possible

- Reduced DB calls for fetching application and related permission
- Added Criteria for removing JS function from the repository call
- Added a in memory cache to hold default plugins. (this would be used
for filling missing details in action from plugin) resulted in 25-28%
performance advantage.
- **A good next step would have been adding index on all query
parameters, however have held on to that for some data.**

In the PR we have added Micrometer observability for /actions endpoint
as for more data.

> This PR addresses tries to improve the performance of the above
endpoints by means of reducing redundant calls to DB, and caching
wherever possible.

Fixes #21850 

## Type of change
- Chore (housekeeping or task changes that don't impact user perception)

## This has been tested:
- Manual

## Progress: 
The DP created with this PR was tested, however the results were not
consistent. waiting for testing dashboard to be ready to verify the
median/p95 timings from the data

## Checklist:
### Dev activity
- [x] My code follows the style guidelines of this project
- [x] 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
- [x] 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
2023-05-05 15:31:24 +07:00
..
.run chore: Upgrade to Spring Boot 3.0.1 (#19044) 2023-01-02 19:40:59 +07:00
appsmith-git fix: Git connected apps are showing a status error (#22046) 2023-04-04 06:09:43 +05:30
appsmith-interfaces chore: improving /actions endpoint performance (#22109) 2023-05-05 15:31:24 +07:00
appsmith-plugins fix: Added single quotes on hint query containing mustache substitution fo… (#22848) 2023-05-03 22:06:22 +05:30
appsmith-server chore: improving /actions endpoint performance (#22109) 2023-05-05 15:31:24 +07:00
envs fix: Updated server set up docs to lower confusion from logs (#22926) 2023-05-03 10:17:34 +05:30
mongo-seed
reactive-caching fix for caching library autoconfiguration (#19849) 2023-01-17 22:18:42 +05:30
scripts feat: migrate from org to workspace under phase 3 (#14158) 2022-07-20 17:24:16 +05:30
.gitignore
build.sh chore: Check Java version in build script (#19531) 2023-01-06 22:20:58 +05:30
buildpack-run.sh
docker-compose.yml
Dockerfile chore: Upgrade to Spring Boot 3.0.1 (#19044) 2023-01-02 19:40:59 +07:00
entrypoint.sh fix: Added JVM arg to opens java.time module to project (#20326) 2023-02-02 17:19:53 +05:30
pom.xml chore: Upgrade to Spring Boot 3.0.1 (#19044) 2023-01-02 19:40:59 +07:00
Procfile
README.md ci: Modularizing the Github actions workflow for maintainability (#16505) 2022-09-09 01:08:55 +05:30
system.properties chore: Upgrade to Spring Boot 3.0.1 (#19044) 2023-01-02 19:40:59 +07:00

Appsmith Server

This is the server-side repository for the Appsmith framework.

For details on setting up your development machine, please refer to this Setup Guide.