-
Notifications
You must be signed in to change notification settings - Fork 378
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: validate dialog take a long time when updating lg in form #5483
Conversation
Looks good, this should be the last piece to include for a patch release. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lei9444 try adding a remote skill to composer. It seems to break the app inside the validateDialogs
Composer/packages/client/src/recoilModel/dispatchers/project.ts
Outdated
Show resolved
Hide resolved
Composer/packages/client/src/recoilModel/dispatchers/project.ts
Outdated
Show resolved
Hide resolved
|
||
updateLgFiles(callbackHelpers, projectId, { updates: updatedFiles }, (current, changed) => { | ||
// compare to drop expired content already setted above. | ||
return current?.content === changed?.content; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line break multilang file sync, We need also compare id, because "updateFiles" can be other lg file, and the content is always different , then will always drop their changes. Fixed this in #5654
…soft#5483) * async selector * update lg files state * update the luProvider for dialog * fix unit test * add cache for dialog validate * fix lint * fix comments * fix tests * fix lint * update text * fix lint * fix lint Co-authored-by: Srinaath Ravichandran <srinaath27@gmail.com> Co-authored-by: Dong Lei <donglei@microsoft.com>
Description
Root cause
The lg file update will trigger the validation function for all dialogs. A single dialog will take about 15ms, and if we have 10 dialogs in one bot, the validate time maybe 150ms.
Fix
Task Item
#minor
Screenshots
Main branch:

This PR
