Commit graph

9 commits

Author SHA1 Message Date
Sebastian Wolf
cccb48ced5
Merge pull request #119 from jgibbon/feature/qml-import-versions
clean up qml imports
2020-11-01 19:37:49 +01:00
John Gibbon
2cd4012b6a QtQuick 2.6 2020-10-31 20:49:03 +01:00
John Gibbon
1fa7192728 Reduce ChatPage.qml jit compile time
First of all: Take all measurements I mention with a grain of salt – all of them are rough and not necessarily measured more than a few times. All times were measured on an Xperia X run via SDK.

Visiting a chat page can take a long time, especially before the qml is cached by the engine.
When opening it for the first time after application launch, it sometimes takes >1000ms from onClicked (OverviewPage) to Component.OnCompleted (Chatpage).
Subsequent activations take roughly 470-480ms.

With these changes, I was able to reduce these times to ~450ms for the first, ~100ms for subsequent activations of the ChatPage on my test device.

Things changed:
- The components for displaying extra content to a message are (mostly) gone and replaced by a single Loader. This Loader does not use sourceComponent to trade the initial compilation boost for a neglegible bit of runtime penalty.
- Connections were consolidated
- I was surprised how costly the inclusion of the RemorseItem was (compiling ~75ms, initializing up to ~20ms for every delegate). So I traded a bit for a compromise. deleteMessageRemorseItem is now defined on the appWindow level, where it gets a bit mitigated by the animations at application start. Also, only one deletion at a time is now possible. We can easily revert this change, but I thought it worthwhile despite its drawbacks.
- profileThumbnailComponent is now defined directly as sourceComponent, removing the need for its id. Probably didn't do anything.
- InReplyToRow had width: parent.width, so I removed horizontalCenter. Also probably didn't change compilation time at all.
- Another compromise I was willing to take – your opinion may differ: The PickerPages took ages (~200ms) to just parse/compile inside those Components, so I replaced them with the "string notation" of pageStack.push. Drawback: The first time a picker gets activated, you'll see how slow it is. Subsequent activations aren't that bad – also for the other pickers.
2020-10-30 20:37:25 +01:00
John Gibbon
d38490fb09 use svg icons
Closes #102.

Doesn't use Shader/HighlightImage for background/placeholder, since that neither matched the previous look nor meet my visual expectations at all. I created both previously available color variations as svg accordingly.
Implementation of the background images has been outsourced to a dedicated qml file to reduce duplication and ensure the same layout. Padding is now "medium" everywhere (stickers had none, audio had "small").

For the Icons, some (Highlight-)Image+MouseArea combinations have been changed to IconButton.
Regarding videos, I'm not actually sure if the missing "highlight" on the fullscreen icon was intentional. An issue with videos possibly having the same color as the icon remains basically the same. Nonetheless, if this isn't desired, I'll revert to just using the white image.

The sticker icon actually does look a bit differently now – it's a bit smaller. I've redrawn it from scratch but mostly kept the dimensions of icon-m-other (which doesn't look good when zoomed in, btw). Perhaps I actually did made a mistake drawing the previous one. Either way, I think it fits well enough.

The notification icon remains png, but I managed to reduce its file size by ~60% without visibly impacting it much imho.

This may be the longest commit message I've ever written.
2020-10-26 15:15:53 +01:00
Sebastian J. Wolf
91ae3651ef Change license header to reflect number of contributions 2020-10-19 19:34:47 +02:00
Slava Monich
f86e60b4a2 Let context menu to appear when sticker is long-pressed
And don't load placeholder image too quickly.
2020-10-18 21:10:26 +03:00
Sebastian J. Wolf
a527009f86 Don't do stuff which is not needed ;) 2020-08-29 16:58:48 +02:00
Sebastian J. Wolf
391dd597e2 Initial performance improvements 2020-08-29 16:32:43 +02:00
Sebastian J. Wolf
abdf9072e7 Display stickers (use thumbnails for animated ones) 2020-08-26 10:46:43 +02:00