Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(resources/chat): optimize multiple suggestion add
As mentioned in https://forum.cfx.re/t/5111873, when a resource starts, a lot of ON_SUGGESTION_ADD messages get spammed, which since they're Vue methods leads to the whole Vue change detection running for every posted message, hanging the entire NUI renderer process. As a workaroumd, we batch multi-add calls into a single Vue method. A proper fix would rather involve deferring Vue change detection until after a batch is done, or ideally a better platform queue for 'spammy' NUI messages instead of the CEF process message stuff.
- Loading branch information
1 parent
a7f8e6b
commit 296414a
Showing
2 changed files
with
22 additions
and
20 deletions.
There are no files selected for viewing
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