Page MenuHomePhabricator

Pre-Computed Text
Open, TODOPublic

Description

Pre-Computed Text

Definition:
A text which has the character metrics data stored in it (pre-computed, could be in a background thread on creation).

Purpose:
Increase text drawing performance, as 90% of text rendering is calculations.
If performance can be improved in anyway it definitely should be done and pre-computed text can help with that!

Description:
Every developer is aware of how complex and time consuming text display is.
As per google measuring text (in Android) can take up to 90% of the time required to set the text.
pre-computed Text enables us to perform the most time-consuming parts of text layout beforehand.
When a pre-computed Text is created, it will measure the text metrics during the creation for all text,
get the glyph's, check hyphenation and position them, no matter visible or not.
Imagine scrolling a list of Textblocks with alot of text for the first time without pre-computed Text ! Getting text measurements for the first time ! etc …..

Limitation:
The control that will display the text should have the same font parameters and text as used in pre-computed text
thus cannot be shared between controls (they can only if they have same parameters) and these info needed to be known beforehand.

Platform:
Newly added to Android (Android 9).

AbdullehGhujeh triaged this task as TODO priority.
Herald closed this task as Invalid. · View Herald TranscriptDec 9 2019, 4:29 AM
Herald added a project: Restricted Project. · View Herald Transcript

This ticket has been closed as spam because it lacks a description. If this ticket is not spam, please reopen it after adding a description.

AbdullehGhujeh reopened this task as Open.
AbdullehGhujeh removed a project: Restricted Project.

could you please add some tags?