Fernschreiber is a Telegram client for Sailfish OS
Find a file
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
db Search for emojis with :<keyword> 2020-10-18 18:57:01 +02:00
icons Change logo/icon - thanks to @iamnomeutente 2020-10-16 23:00:08 +02:00
images use svg icons 2020-10-26 15:15:53 +01:00
qml Reduce ChatPage.qml jit compile time 2020-10-30 20:37:25 +01:00
rpm Prepare translation files for #87 2020-10-19 19:51:33 +02:00
src Merge branch 'master' into const-refs 2020-10-26 21:28:39 +01:00
tdlib/include/td Some clean-up and preparation for multi-target builds 2020-09-26 15:53:47 +02:00
translations Merge pull request #113 from jgibbon/feature/reenable-poll-type-display 2020-10-30 20:28:43 +01:00
.gitignore Initialize Fernschreiber repository 2020-08-10 14:17:29 +02:00
harbour-fernschreiber.desktop Initialize Fernschreiber repository 2020-08-10 14:17:29 +02:00
harbour-fernschreiber.pro Merge branch 'master' into feature/use-svgs 2020-10-26 22:17:13 +01:00
LICENSE Initial commit 2020-08-10 13:50:11 +02:00
README.md Update harbour-fernschreiber-it.ts and README.md 2020-10-27 21:55:04 +01:00

Fernschreiber

A Telegram client for Sailfish OS

Author

Sebastian J. Wolf sebastian@ygriega.de and several contributors

Contributions

Fernschreiber wouldn't be the same without all the people helping in making it better. Thank you very much to all contributors!

Code (Features, Bugfixes, Optimizations etc.)

  • Chat list model, TDLib receiver, project dependencies: Slava Monich
  • Chat info page, location support, app initialization/registration with Telegram, project dependencies: jgibbon

Logo/Icon

Translations

License

Licensed under GNU GPLv3

Build

Simply clone this repository and use the project file harbour-fernschreiber.pro to import the sources in your SailfishOS IDE. To build and run Fernschreiber or an application which is based on Fernschreiber, you need to create the file harbour-fernschreiber/src/tdlibsecrets.h and enter the required constants in the following format:

#ifndef TDLIBSECRETS_H
#define TDLIBSECRETS_H
const char TDLIB_API_ID[] = "42424242";
const char TDLIB_API_HASH[] = "1234567890abcdef1234567890abcdef";
#endif // TDLIBSECRETS_H

You get the Telegram API ID and hash as soon as you've registered your own application on https://my.telegram.org.

Moreover, you need to have a compiled version of TDLib in the sub-directory tdlib. This sub-directory must contain another sub-directory that fits to the target device architecture (e.g. armv7hl, i486). Within this directory, there needs to be a folder called lib that contains at least libtdjson.so. For armv7hl the relative path would consequently be tdlib/armv7hl/lib.

If you want to contribute bug fixes, improvements, new features etc. please create a pull request (PR). PRs are always welcome and will be reviewed as soon as possible, but may take some time. :)

Credits

This project uses

  • The Telegram Database Library (TDLib) - available on GitHub.com. Thanks for making it available under the conditions of the Boost Software License 1.0! Details about the license of TDLib in its license file.
  • Emoji parsing and artwork by Twitter Emoji (Twemoji), copyright 2018 Twitter, Inc and other contributors, Code licensed under the MIT License, Graphics licensed under CC-BY 4.0

Fernschreiber was translated to several languages. Thanks to all contributors!