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

[Task] Analyse the JSObject creation flow metrics #37151

Closed
Tracked by #37047
rishabhrathod01 opened this issue Oct 31, 2024 · 2 comments
Closed
Tracked by #37047

[Task] Analyse the JSObject creation flow metrics #37151

rishabhrathod01 opened this issue Oct 31, 2024 · 2 comments
Assignees
Labels
Javascript Product Issues related to users writing javascript in appsmith JS Objects Issues related to JS Objects Query & JS Pod Issues related to the query & JS Pod Task A simple Todo

Comments

@rishabhrathod01
Copy link
Contributor

rishabhrathod01 commented Oct 31, 2024

This task analyses the logs when:

  • JS object is created and we copy paste another huge JS object into this one, typically when we paste a jsobject which creates 35-40 new actions, the update API times out.
@Nikhil-Nandagopal Nikhil-Nandagopal added the Task A simple Todo label Oct 31, 2024
@rishabhrathod01 rishabhrathod01 added the JS Objects Issues related to JS Objects label Oct 31, 2024
@github-actions github-actions bot added Javascript Product Issues related to users writing javascript in appsmith Query & JS Pod Issues related to the query & JS Pod labels Oct 31, 2024
@sneha122
Copy link
Contributor

The log analysis is done by following the traces mentioned here: https://onenr.io/0VwgZL0K0QJ

Considering JS object which is creating 40 new actions: https://onenr.io/0oQDqnmGNwy
Each action is created with createAction function call. From the traces above we can see that if create action takes ~17s of time, 1st component takes around ~14s, 2nd component takes around 2s and last one takes around few ms.
Screenshot 2024-11-11 at 8 04 03 PM

After analysing the logs, we can see that there are three components that are causing delays:

  1. When we check if the name is allowed or not -> This component takes 80-90% of the total create action time, if we optimise this function we can take care of most of the timeout issues
  2. Fetching the page data from DB -> This is the second time consuming part, it takes around 5-7% of the create action time
  3. Saving the actions in DB -> This takes around 3-5% of the create action time (Only in exceptional cases it takes more)

We should definitely prioritise and fix 1st component and subsequently rest of the components can be taken up.

CC: @rishabhrathod01

@sneha122
Copy link
Contributor

Closing this issue and will create separate tasks for each optimisation proposed here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Javascript Product Issues related to users writing javascript in appsmith JS Objects Issues related to JS Objects Query & JS Pod Issues related to the query & JS Pod Task A simple Todo
Projects
None yet
Development

No branches or pull requests

3 participants