-
-
Notifications
You must be signed in to change notification settings - Fork 554
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Scroll performance #128
Comments
Are you seeing poor performance on a device, or on the simulator? If on a device, what type(s)? On an iPhone 6 with the sample project you provided I see a smooth framerate for the entire scroll, except for right when the animation completes and loops again - I've noted that issue here in the Swift repo. |
I run it on an iPhone 6 (device). It doesn’t seem to 60 frames per second. Is that possible or is it a illusion?
|
Hmm it might be somewhat of an illusion? I profiled your example in Instruments and it seemed to stay at 59/60 fps on my iPhone 6, but if your actual implementation is doing other animations or CPU work it could probably affect it significantly. MarqueeLabel just fires off a CAKeyframeAnimation upon each loop and then does nothing until the next loop, so as far as I know CPU usage is really low most of the time. If you're seeing significant fps drops you might be bumping up against a Core Animation limitation? Try making the label background a solid, opaque color and setting |
This makes it a little better. It seems the marqueelabel cuts away some of the characters. Can I remove the limit? |
Which limit are you referring to? |
Character limit
|
Oh the size limit that's defined here? Sure, that's there mostly to protect people that aren't aware of the limit, because if you go over the length limit of a UILabel it just doesn't draw anything. I also recently reduced the limit because apparently the 6S limit is lower. If you're not worried about that potential effect or know you won't go over, feel free to comment out that line. If you're using extremely long strings, that could be a possible reason for your laggy scrolling. Could be pushing Core Animation too far? |
the lagging is also on short labels. i only discovered the truncating when i used a very longlabel. what is the characterlimit? |
There isn't a character count limit, only a size limit. The size limit is fairly big (see the link in my previous comment). On Mar 3, 2016, 10:24 PM -0700, Jonathan Arnoldnotifications@github.com, wrote:
|
#141 I've tweaked the applyGradientMask... method to have some caching/performance improvements. Seemed to somewhat improve the scrolling performance in an app I'm working on |
Guess I'll go ahead and consider this resolved, with no other noted issues and #141 incorporated. I can reopen if otherwise! |
As already mentioned the scroll perfomance / feel on large text feels not so smooth as excepted.
The text was updated successfully, but these errors were encountered: