Objective-C Objective-C++ Swift Ruby Shell Python C++
Latest commit 03a1aa2 Apr 30, 2017 @appleguy appleguy committed on GitHub [ASDisplayNode] Implement a std::atomic-based flag system for superb …
…performance (#89)

* [ASDisplayNode] Convert isSynchronous to an Objective-C atomic BOOL.

This reduces lock contention, and should also fix a very rarely seen deadlock.

* [ASDisplayNode] Implement a std::atomic-based flag system for superb performance

Although Objective-C atomics are equally fast, or better that std::atomic when
access through method calls, for the most intense use cases it is best to avoid
method calls entirely.

In ASDisplayNode, we could benefit significantly from avoiding both method calls
(already true today) but also avoid locking the mutex, for both CPU and contention
gains.

There will still be many methods that need locking for transactional
consistency - however, there are currently dozens of accessor methods that could
avoid frequent lock / unlock cycles with use of atomics, and other usages of the
ivars directly where locking could be delayed until after early-return conditions
are checked and passed.
Permalink
Failed to load latest commit information.
.github Delete GITHUB_RULES.md Apr 14, 2017
ASDK-Licenses Update License (#6) Apr 14, 2017
ASDKListKit Update license v2 (#67) Apr 24, 2017
AsyncDisplayKit.xcodeproj Simplify Hashing Code (#86) Apr 29, 2017
AsyncDisplayKit.xcworkspace disable autocreate schemes Mar 17, 2016
CI Don't run tests for the docs directory. (#79) Apr 27, 2017
Source [ASDisplayNode] Implement a std::atomic-based flag system for superb … Apr 30, 2017
Tests Update license v2 (#67) Apr 24, 2017
buck-files Support Buck build (#2849) Jan 4, 2017
docs Fix site header (#84) Apr 28, 2017
examples Hopefully the last example fix. Apr 14, 2017
examples_extra More example fixes Apr 14, 2017
plans/LayoutDebugger Layout debugger proposal (#52) Apr 22, 2017
smoke-tests Update license v2 (#67) Apr 24, 2017
.buckconfig Support Buck build (#2849) Jan 4, 2017
.buckversion Buck: use snapshot_reference_images_path instead of copying images to… Jan 20, 2017
.editorconfig Add .editorconfig Apr 29, 2016
.gitignore Support Buck build (#2849) Jan 4, 2017
.slather.yml [.slather.yml] Add newline to end of file Apr 21, 2015
.travis.yml IGListKit Support II: Electric Boogaloo (#2942) Jan 30, 2017
BUCK Standardize Dependency Flags for PINRemoteImage, IGListKit (#3244) Apr 7, 2017
CHANGELOG.md Simplify Hashing Code (#86) Apr 29, 2017
CONTRIBUTING.md Update license v2 (#67) Apr 24, 2017
Cartfile Bumped PINRemoteImage (3.0.0-beta.9), PINCache (3.0.1-beta.4) (#37) Apr 19, 2017
Dangerfile Update license v2 (#67) Apr 24, 2017
Gemfile Add danger-slack Apr 26, 2017
LICENSE Update License (#6) Apr 14, 2017
Podfile Remove Support for iOS 7 (#2930) Feb 1, 2017
README.md Add blog post (#9) Apr 14, 2017
Texture.podspec Update to 2.3.1 Apr 27, 2017
build.sh Adding buildkite support (#1) Apr 14, 2017
run_tests_update_status.sh Add danger (#18) Apr 19, 2017

README.md

Coming from AsyncDisplayKit? Learn more here

Texture

Apps Using Downloads

Platform Languages

Version Carthage compatible License

Installation

Texture is available via CocoaPods or Carthage. See our Installation guide for instructions.

Performance Gains

Texture's basic unit is the node. An ASDisplayNode is an abstraction over UIView, which in turn is an abstraction over CALayer. Unlike views, which can only be used on the main thread, nodes are thread-safe: you can instantiate and configure entire hierarchies of them in parallel on background threads.

To keep its user interface smooth and responsive, your app should render at 60 frames per second — the gold standard on iOS. This means the main thread has one-sixtieth of a second to push each frame. That's 16 milliseconds to execute all layout and drawing code! And because of system overhead, your code usually has less than ten milliseconds to run before it causes a frame drop.

Texture lets you move image decoding, text sizing and rendering, layout, and other expensive UI operations off the main thread, to keep the main thread available to respond to user interaction.

Advanced Developer Features

As the framework has grown, many features have been added that can save developers tons of time by eliminating common boilerplate style structures common in modern iOS apps. If you've ever dealt with cell reuse bugs, tried to performantly preload data for a page or scroll style interface or even just tried to keep your app from dropping too many frames you can benefit from integrating Texture.

Learn More

Getting Help

We use Slack for real-time debugging, community updates, and general talk about Texture. Signup yourself or email textureframework@gmail.com to get an invite.

Contributing

We welcome any contributions. See the CONTRIBUTING file for how to get involved.

License

The Texture project was created by Pinterest as a continuation, under a different name and license, of the AsyncDisplayKit codebase originally developed by Facebook. AsyncDisplayKit was originally released by Facebook under a BSD license and additional patent grant. Those BSD and patent licenses govern use of code in Texture contributed prior to 4/13/2017 (the original AsyncDisplayKit code), and copies of the licenses are included in the root directory of this source tree for reference. All code contributed to Texture after 4/13/2017 is released by Pinterest under an Apache 2.0 license.