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

fix: Improve performance of the editor behavior in LG #3900

Merged
merged 9 commits into from
Aug 26, 2020

Conversation

lei9444
Copy link
Contributor

@lei9444 lei9444 commented Aug 26, 2020

Description

In recoil and undo PR, the lg templates CRUD are removed from the worker, and some async functions were changed to synchronous.
It will take up a lot of cpu time during the parse processing, the main thread will be blocked and affect the editor input experience.

  1. Revert some of the code about the async functions. feat: Add undo/redo for design page #3780
  2. Add cache in the lg worker thread. We can use the parse result to improve the lg template CRUD performance. But the parse tree has Int32Array type, and can't be frozen by recoil. The composer will get the result without the parse result. So keep them in the worker thread.
  3. Add debounced shell API for the editor. The copy, paste and move need to update lg before committing the snapshot to the undo stack. But the editor update can use debounced API to improve the performance.

Task Item

#minor
#refs #3891 update the lg all up view will throw error

Screenshots

@coveralls
Copy link

coveralls commented Aug 26, 2020

Coverage Status

Coverage increased (+0.2%) to 56.539% when pulling 2ce50d4 on lei9444:lgperf into 3406c72 on microsoft:main.

@a-b-r-o-w-n a-b-r-o-w-n self-assigned this Aug 26, 2020
@a-b-r-o-w-n a-b-r-o-w-n merged commit 3bb51df into microsoft:main Aug 26, 2020
@a-b-r-o-w-n a-b-r-o-w-n deleted the lgperf branch August 26, 2020 17:02
lei9444 added a commit to lei9444/BotFramework-Composer-1 that referenced this pull request Jun 15, 2021
* fix: improve the editor behavior in LG

* fix unit test

* convert the template range

* update the content check

* fix unit test

* fix onboarding e2e test

* update the e2e test

Co-authored-by: Srinaath Ravichandran <srinaath27@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants