lexrus / lexrus/LTMorphingLabel

Crippled performance, sometimes crashing on longer strings

Open
#18 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug help wanted
Dominant language
Swift
Stars
8.1k
Forks
776
PR merge metrics
No merged PRs in 30d

Description

I've found that setting strings longer than about 50 characters crawls to a halt. Sometimes crashes. A simple fix would be to just not animate if the length is greater than a certain number. I attempted to do this by modifying the setter for the text variable, pausing the display link and setting super.text to the value if it was above a threshold. This sometimes works, but I think I'm missing something, as I still get issues with performance. Advice appreciated. Would love to use this in the next rev of Slated if I can get it reliable.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the slowdown and crashes with strings longer than about 50 characters, then inspect the text setter and display-link handling described in the issue. Done means long strings remain usable without severe performance degradation or crashes, including when animation is bypassed.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.