tmdvs / TDBadgedCell

TDBadgedCell is a table view cell class that adds a badge, similar to the badges in Apple's own apps
www.tmdvs.me
MIT License
1.43k stars 181 forks source link

TDBadgedCell performance issue #73

Closed KanybekMomukeyev closed 7 years ago

KanybekMomukeyev commented 7 years ago

Only want to ask question: When scrolling tableView, while there is a badge on cell, there is serious performance issue, flickering, and it's sometimes annoying. Any solution of this

private func drawBadge()
tmdvs commented 7 years ago

I've just run a test app with 500 badge cells and I was able to scroll without any visual lag. Can you confirm there is nothing blocking the main thread in your datasource cellForRowAt: method which could be causing flicking/delayed drawing?

KanybekMomukeyev commented 7 years ago

@tmdvs now will try to profile and find exactly what cause this issue

KanybekMomukeyev commented 7 years ago

@tmdvs something wrong with my xcode 8.2 instruments profiler, Time Profiler did not showing methods, only memory adress, will continue search, but exactly flickering there, where is a badge, on ipad mini 1, ios 9.3

tmdvs commented 7 years ago

I'm closing this issue for now, however I will re-open it should the issue become replicable!

KanybekMomukeyev commented 7 years ago

@tmdvs

screen shot 2017-02-23 at 09 51 46

Here is shown on my ipad mini 1 And i understand why this is happening, here on stackoverflow say than on scroll setHighlighted and setSelected calling many times, so drawBadge() calling many times!