D27337: [Emojier] Optimize performance

Chris Holland noreply at phabricator.kde.org
Wed Feb 12 00:02:25 GMT 2020


Zren created this revision.
Herald added a project: Plasma.
Herald added a subscriber: plasma-devel.
Zren requested review of this revision.

REVISION SUMMARY
  BUG: 417454
  
  The emojier fairly slow. Launching is slow. Resizing the window is slow. Changing pages is slow. Scrolling is also slow.
  
  On launch, the sidebar widens from `0px`, resizing the `GridView`, which resizes `cellWidth` as we abuse it's the width calculation to create cell spacing. Resizing 1000 emoji Labels is slow. This also happens when you resize the window. The cpu core spikes to 100% (on a 2.8Ghz cpu).
  
  F8098605: screen-2020-02-11_18.21.04.mp4 <https://phabricator.kde.org/F8098605>
  
  After selecting an emoji, closing, and reopening, the recent emoji's is shown first (without a search box) which opens faster since it has much less work. However switching to the all emoji page resurfaces the problem.
  
  Scrolling is also a problem, as loading the emoji `QQC2.Label`s is slow. So we'll use a `Loader { asynchronous: true }`. I'm not sure why it loads them from bottom to top.
  
  Here's what it looks like after this patch. Resizing no longer blocks, nor does scrolling.
  
  F8098612: screen-2020-02-11_18.18.37.mp4 <https://phabricator.kde.org/F8098612>

TEST PLAN
  How I compile and run emojier by itself:
  https://gist.github.com/Zren/1d16e51199c9e47718ccfe41755d8ee2

REPOSITORY
  R119 Plasma Desktop

REVISION DETAIL
  https://phabricator.kde.org/D27337

AFFECTED FILES
  applets/kimpanel/backend/ibus/emojier/ui/CategoryPage.qml

To: Zren
Cc: plasma-devel, Orage, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, fbampaloukas, GB_2, ragreen, ZrenBot, ngraham, alexeymin, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, ahiemstra, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20200212/98e2ea87/attachment.html>


More information about the Plasma-devel mailing list