mta452 / SheenFigureLegacy

A library to render arabic/urdu fonts on smartphones.
Apache License 2.0
30 stars 6 forks source link

Very slow on iPhone device with 10K number of lines #11

Open jinnajmal opened 11 years ago

jinnajmal commented 11 years ago

Awesome library in fact

i am using this control to render some articles and some of them are thousands of lines, its taking almost 30 seconds to prepare and render a SSTextView with 10 thousands lines with font size of 20

Please tell me how can i resolve this issue

thanks

mta452 commented 11 years ago

If you are going to render this much lines, it will definitely take time as multiple font tables are to be applied on the text. Moreover arm architecture is much slower than x86_x64, therefore more time is consumed in processing on device.

jinnajmal commented 11 years ago

thanks Tayyab for quick reply, Would you suggest any solution for this problem in current implementation. i have compared the results with UITextView, and UITextView is surprisingly fast.

sliaquat commented 11 years ago

SheenFigure is a remarkable effort by Tayyab. However, if your aim is just to display text in popular Urdu fonts, you can use core text on iOS and OS X.

-- Sent from my mobile device.

On Jun 28, 2013, at 3:33 PM, Muhammad Ajmal notifications@github.com wrote:

thanks Tayyab for quick reply, Would you suggest any solution for this problem in current implementation. i have compared the results with UITextView, and UITextView is surprisingly fast.

— Reply to this email directly or view it on GitHub.

mta452 commented 11 years ago

Actually UITextView does not do shaping, that's why it is faster. As of know the only way for you is to either reduce the text or divide it into several portions and let the users read those portions like pages.

However, if you provide me the sample file I can analyze the most slow process and think of ways to make it work faster.

jinnajmal commented 11 years ago

thanks Tayyab

https://dl.dropboxusercontent.com/u/6137862/ur.maududi https://dl.dropboxusercontent.com/u/6137862/Jameel%20Noori%20Nastaleeq%20Kasheeda.ttf

jinnajmal commented 11 years ago

i have a Label control which also uses core text framework, i wish if you Text View also do the same :)

https://dl.dropboxusercontent.com/u/6137862/PPLabel.h https://dl.dropboxusercontent.com/u/6137862/PPLabel.m

but this doesn't work with these custom fonts.

jinnajmal commented 11 years ago

you can see the complete project here https://github.com/petrpavlik/PPLabel