Skip to content
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

Minor performance improvements for TextBubble #166

Merged
merged 2 commits into from
Jun 27, 2016

Conversation

diegosanchezr
Copy link
Contributor

@diegosanchezr diegosanchezr commented Jun 27, 2016

Minor performance improvements:

  • Avoids updating font and color in TextBubble if it's not needed: would make attributed text to update
  • Avoids updating views in selected setter if value didn't change (setter is called by the collection view as part of dequeuing)
  • Avoids creating dictionary of attributes all the time for date attributed string (for some reason this was appearing in profiling with some swift-to-objc conversions)

Uses enum as image key in text style for greater safety.

@diegosanchezr diegosanchezr changed the title Minor Performance Minor performance improvements for TextBubble Jun 27, 2016
 - Avoids updating font and color in TextBubble if it's not needed: would make attributed text to update
 - Avoids updating views in selected setter if value didn't change (setter is called by the collection view as part of dequeuing)
 - Avoids creating dictionary of attributes all the time for date attributed string (for some reason this was appearing in profiling with some swift-to-objc conversions)

Uses enum as image key in text style for greater safety.
@diegosanchezr diegosanchezr force-pushed the textbubble-minor-performance-improvements branch from 1b570e3 to 40856a6 Compare June 27, 2016 21:25
@codecov-io
Copy link

codecov-io commented Jun 27, 2016

Current coverage is 65.34%

Merging #166 into dev will decrease coverage by <.01%

@@                dev       #166   diff @@
==========================================
  Files            61         61          
  Lines          3308       3310     +2   
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
+ Hits           2162       2163     +1   
- Misses         1146       1147     +1   
  Partials          0          0          

Powered by Codecov. Last updated by 7d41490...40856a6

@diegosanchezr diegosanchezr merged commit 37dd3bd into dev Jun 27, 2016
@diegosanchezr diegosanchezr deleted the textbubble-minor-performance-improvements branch June 27, 2016 22:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants