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

Perf: Transcript and Activity render speed #5183

Merged
merged 16 commits into from
May 16, 2024
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ Notes: web developers are advised to use [`~` (tilde range)](https://github.com/
- Improved performance for `useActivityWithRenderer`, in PR [#5172](https://github.com/microsoft/BotFramework-WebChat/pull/5172), by [@OEvgeny](https://github.com/OEvgeny)
- Fixes [#5162](https://github.com/microsoft/BotFramework-WebChat/issues/5162). Improved performance for `useActivityTreeWithRenderer`, in PR [#5163](https://github.com/microsoft/BotFramework-WebChat/pull/5163), by [@compulim](https://github.com/compulim)
- Fixes [#5175](https://github.com/microsoft/BotFramework-WebChat/issues/5175). `PrecompiledGlobalize.js` is emitted instead of `.cjs`, by [@compulim](https://github.com/compulim) in PR [#5181](https://github.com/microsoft/BotFramework-WebChat/pull/5181)
- Improved performance for `BasicTranscript`, in PR [5183](https://github.com/microsoft/BotFramework-WebChat/pull/5183), by [@OEvgeny](https://github.com/OEvgeny)
- Fixed potential memory usage issues caused by `useActivitiesWithRenderer`, in PR [5183](https://github.com/microsoft/BotFramework-WebChat/pull/5183), by [@OEvgeny](https://github.com/OEvgeny)

### Changed

Expand Down
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 4 additions & 3 deletions __tests__/html/fluentTheme/attachMultipleFiles.html
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,10 @@
{ type: 'image/jpeg' }
);

await pageObjects.runHook(({ useSendBoxAttachments }) =>
useSendBoxAttachments()[1]([{ blob: blob1 }, { blob: blob2 }])
);
await pageObjects.runHook(({ useSendBoxAttachments }) => {
OEvgeny marked this conversation as resolved.
Show resolved Hide resolved
const attachmentsRef = React.useRef([{ blob: blob1 }, { blob: blob2 }]);
useSendBoxAttachments()[1](attachmentsRef.current);
});

await pageConditions.became(
'attachment count change to 2',
Expand Down
2 changes: 1 addition & 1 deletion __tests__/html/renderActivity.performance.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/** @jest-environment ./packages/test/harness/src/host/jest/WebDriverEnvironment.js */

describe('Batched renderer', () => {
describe('Activity render performance', () => {
test('does not produce unnecessary rerenders', () => runHTML('renderActivity.performance'));
});