-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Improve Linting performance (#23865)
## Description This PR introduces a new architecture, making evaluation and linting independent. <img width="500" alt="Screenshot 2023-07-04 at 17 24 40" src="https://github.com/appsmithorg/appsmith/assets/46670083/00b1eab9-cd79-4442-b51a-5345c2d6c4da"> In the previous architecture, one dependency graph was used to hold the relationship between entities in the application and subsequently, the "evaluation order" and "paths to lint" were generated. Although similar, the dependency graph required for evaluation and linting differ. For example, trigger fields should not depend on any other entity/entity path in the eval's dependency graph since they are not reactive. This is not the case for the linting dependency graph. ## Performance - This PR introduces "lint only" actions. These actions trigger linting, but not evaluation. For example, UPDATE_JS_ACTION_BODY_INIT (which is fired immediately after a user edits the body of a JS Object). Since linting fires without waiting for a successful update on the server, **response time decreases by 40%** (from 2s to 1.2s). - Reduction in time taken to generate paths requiring linting. <img width="715" alt="Screenshot 2023-07-04 at 18 10 52" src="https://github.com/appsmithorg/appsmith/assets/46670083/d73a4bfc-de73-4fa7-bdca-af1e5d8ce8a1"> #### PR fixes following issue(s) Fixes #23447 Fixes #23166 Fixes #24194 Fixes #23720 Fixes #23868 Fixes #21895 Latest DP: https://appsmith-r3f9e325p-get-appsmith.vercel.app/ #### Type of change - Chore (housekeeping or task changes that don't impact user perception) ## Testing > #### How Has This Been Tested? - [x] Manual - [ ] Jest - [ ] Cypress > > #### Test Plan #23865 (comment) > > #### Issues raised during DP testing #23865 (comment) response: #23865 (comment) > > > ## 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: - [ ] [Speedbreak features](https://github.com/appsmithorg/TestSmith/wiki/Test-plan-implementation#speedbreaker-features-to-consider-for-every-change) have been covered - [ ] Test plan covers all impacted features and [areas of interest](https://github.com/appsmithorg/TestSmith/wiki/Guidelines-for-test-plans/_edit#areas-of-interest) - [x] Test plan has been peer reviewed by project stakeholders and other QA members - [x] Manually tested functionality on DP - [ ] We had an implementation alignment call with stakeholders post QA Round 2 - [ ] Cypress test cases have been added and approved by SDET/manual QA - [ ] Added `Test Plan Approved` label after Cypress tests were reviewed - [ ] Added `Test Plan Approved` label after JUnit tests were reviewed --------- Co-authored-by: arunvjn <[email protected]> Co-authored-by: Ivan Akulov <[email protected]>
- Loading branch information
1 parent
1ab630f
commit e6f2dca
Showing
59 changed files
with
2,087 additions
and
438 deletions.
There are no files selected for viewing
39 changes: 39 additions & 0 deletions
39
app/client/cypress/e2e/Regression/ClientSide/BugTests/Bug24194_Spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import { | ||
agHelper, | ||
entityExplorer, | ||
jsEditor, | ||
locators, | ||
propPane, | ||
} from "../../../../support/Objects/ObjectsCore"; | ||
|
||
describe("Responsiveness of linting", () => { | ||
before(() => { | ||
entityExplorer.DragDropWidgetNVerify("buttonwidget", 300, 300); | ||
}); | ||
it("Should update linting when entity is added/renamed", () => { | ||
const JS_OBJECT = `export default { | ||
myFun1: () => { | ||
return ""; | ||
}, | ||
myFun2: ()=>{ | ||
return "" | ||
} | ||
}`; | ||
propPane.UpdatePropertyFieldValue("Tooltip", "{{JSObject1.myFun1}}"); | ||
agHelper.AssertElementExist(locators._lintErrorElement); | ||
jsEditor.CreateJSObject(JS_OBJECT, { | ||
paste: true, | ||
completeReplace: true, | ||
toRun: false, | ||
shouldCreateNewJSObj: true, | ||
}); | ||
|
||
entityExplorer.SelectEntityByName("Button1", "Widgets"); | ||
agHelper.AssertElementAbsence(locators._lintErrorElement); | ||
agHelper.RefreshPage(); | ||
entityExplorer.SelectEntityByName("JSObject1", "Queries/JS"); | ||
jsEditor.RenameJSObjFromPane("JSObject2"); | ||
entityExplorer.SelectEntityByName("Button1", "Widgets"); | ||
agHelper.AssertElementAbsence(locators._lintErrorElement); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.