27 Commits

Author SHA1 Message Date
Adlai Holler
dd4359db7b
Optimize ASCATransactionQueue (#1350)
* Optimize ASCATransactionQueue. This queue is very busy, and it runs on the main thread so it's important for it to be fast.

Avoid waking up the run loop for every single node.
Avoid a ton of NSPointerArray overhead that we don't need.
Avoid retain/release traffic on the singleton by using an inline function. I confirmed that in release mode, the static __strong is correctly inlined and no ARC traffic is incurred.

* Comment

* Unlock right

* Remove magic number
2019-03-05 18:20:17 -08:00
Adlai Holler
2a4b77b6d5
Remove let and var macros now that we're all-C++ (#1312)
* Remove let and var macros now that we're all-C++

* Another fix

* More!

* And more!
2019-01-17 10:16:53 -08:00
Michael Schneider
39f25f661e
ASCATransactionQueue interface trashing improvements (#1216)
* ASCATransactionQueue interface trashing improvements

* Use weakSelf
2018-11-11 08:43:07 -08:00
ernestmama
5e0579308d Rollout ASDeallocQueueV2 #trivial (#1143) 2018-10-01 11:20:12 -07:00
appleguy
465abb1ded [License] Simplify the Texture license to be pure Apache 2 (removing ASDK-Licenses). (#1077)
* [License] Simplify the Texture license to be pure Apache 2 (removing ASDK-Licenses)

With permission of the Facebook Open Source team, we are simplifying the Texture
license so that clients can rely on the Apache 2 terms that most of Texture is
already covered by. This means that code originally forked from AsyncDisplayKit
will be re-licensed from "BSD 3-clause + PATENTS v2" to Apache 2 without a
PATENTS file.

After getting confirmation that the updates to these core files look good, we'll
propagate this new license header to all files (in this same PR) and get sign-off
from all parties before landing.

* [License] Update all Texture source files to be pure Apache 2.

* Changelog entry for Apache 2 license update.

* Revert "[License] Update all Texture source files to be pure Apache 2."

This reverts commit ffa0fbbba9717d871dd16c4b07539f2f8208fc2b.

* [License] Update all Texture source files to be pure Apache 2, maintaining copyrights.

* [License] Update CONTRIBUTING, README, Podspec & Dangerfile.
2018-08-28 07:39:18 -07:00
Adlai Holler
093ae3fba0
Remove CATransaction signposts because they cause more transactions than needed and are too chatty. (#1060) 2018-08-02 08:39:01 -07:00
Michael Schneider
55abeed743
Introduce let / var macros and some further cleanup (#1012)
* Introduce let / var and some further cleanup

* Address first comments

* Update changelog

* Move the const before auto
2018-07-10 09:37:53 -07:00
Michael Schneider
d28b17c87f
Fix warnings and memory issues (#1003) 2018-07-03 08:39:49 -07:00
Michael Schneider
b82128ee4e
Add missing instance variables in ASTextNode and warnings cleanup #trivial (#984)
* Add missing instance variables in ASTextNode and warnings cleanup

* Re-add drain
2018-06-24 08:56:10 -07:00
Adlai Holler
a11506564a
Reduce usage of autorelease pools (#968)
* Reduce reliance on the autorelease pool

* changelog

* A few more places

* Use it in another place
2018-06-15 10:15:25 -07:00
Adlai Holler
35d59acd83
Add support for acquiring multiple locks at once (#958)
* Add ASLocking which supports -tryLock and taking multiple locks safely

* Better multi locking

* Assert about lock set capacity
2018-06-05 12:31:30 -07:00
Adlai Holler
cac14e0bce
Standardize Property Declaration Style in Core Classes (#870)
* Audit property attributes for core classes

* Update style guide

* Go crazy

* Update changelog
2018-05-24 14:42:43 -07:00
Adlai Holler
8b890f07be
Create a new dealloc queue that is more efficient (#931)
* Fork dealloc queue in an experiment

* Fix and put back

* Use the right selector

* Go simpler

* Clarify name

* Type inference

* Use CFTypeRefs like a boss

* Improve comments

* License header
2018-05-22 09:06:24 -07:00
Adlai Holler
27fac9f586
Create a centralized configuration API (#747)
* Update the dangerfile

* Make a trivial change to test new dangerfile

* Try out the new value with another trivial change

* Add a configuration API to make a unified place for pulling config from clients safely

* Specify properties for delegate

* Finish removing text experiment global enable

* Generate the config file

* Clean up configuration to fix tests

* Work on making it serializable

* Finish it up

* Fix example code

* Update sample project

* Clean up a few things

* Align with new project order

* Make it faster and update license header

* Add an option to specify your config at compile time

* Update another license header

* Add a version field, and bring interface state coalescing into configuration

* Update CA queue code

* Update CATransactionQueue tests

* Turn transaction queue on by default (for now, see comment)

* Update the tests

* Update the tests AGAIN

* Remove unused ordered set
2018-03-25 12:52:57 -07:00
Adlai Holler
2b12654810
Use NS_RETURNS_RETAINED macro to save time (#843)
* Use NS_RETURNS_RETAINED macro to save time

* Update changelog and do the thing with the license headers
2018-03-21 08:13:09 -07:00
Max Wang
2618c50073 New runloop queue to coalesce Interface state update calls. (#788)
* fix SIMULATE_WEB_RESPONSE not imported #449

* Coalesce interface state updates to ASCATransactionQueue before CATransaction commit.

This will avoid duplicate interface state delegate calls caused by view repeatly added/removed to/from hierarchy during controller animation transition.

* fix tests for new run loop queue

* Support for disabling ASCATransactionQueue

* Fix didExitHierarchy to use ASCATransactionQueue.

* merge range managed and none range managed for didExitHierarchy

* Revert "merge range managed and none range managed for didExitHierarchy"

This reverts commit f807efaa65ed5dbdb6622d06da542e01a53715fa.

* merge range managed and none range managed for didExitHierarchy

* remove metadata

* abstract queue to impl class methods

* Add tests

* Fix test fail because of shared object.

* guard _pendingInterfaceState access with lock

* name refactor

* Refactor from comments https://github.com/TextureGroup/Texture/pull/788/\#pullrequestreview-94849919

* Apply InterfaceState immediately after ASCATranactionQueue is processed and before next runloop started.

* refactor

* no op to start CI build

* remove unused var and kick off tests

* change lisence

* remove code for weak ref

* add change log and adjust license
2018-02-13 12:10:20 -08:00
Adlai Holler
61dade6bda Raise deployment target to iOS 9 (#743)
https://github.com/TextureGroup/Texture/pull/743

Manually merged since I forgot to retarget that diff onto master before merge
2018-01-15 15:13:05 -08:00
Adlai Holler
ff608c92bf
[Minor Breaking API] Make deallocation queues more reliable (#651)
* Make our async deallocation functions take a double pointer, so we can be sure we've released before the queue drains

* Make it a class property

* Fix the return type

* Use a locker

* Improve release notes
2017-11-02 10:45:34 -07:00
César Estébanez Tascón
002c2d6978 Mark ASRunLoopQueue as drained if it contains only NULLs (#558)
* Mark ASRunLoopQueue as drained if it contains only NULLs

* Update CHANGELOG.md

* Cover ASRunLoopQueue with tests

* Include PR link in CHANGELOG.md

* Replace license header of ASRunLoopQueueTests.m with correct one

* Insert a nil in _internalQueue to ensure compaction, instead of maintaining a state for _isQueueDrained
2017-09-11 13:32:25 -07:00
Adlai Holler
8ec4b312cf Overhaul our logging, add activity tracing support. (#399)
* Improve the os_log and os_activity integration

* Address feedback from Scott and Huy
2017-07-03 19:03:26 -07:00
Adlai Holler
4829a8643d Improve System Trace Implementation #trivial (#368)
* Improve the kdebug, system trace integration

* Remove superseded subsystem

* Address review comments

* Please the license header gods

* Address harder

* Fix node block retaining collection view
2017-06-19 10:14:39 -07:00
Adlai Holler
d9dec8fdf9 Fix memory leaks, add section-object support to new test harness (#360) 2017-06-16 09:25:16 -07:00
Garrett Moon
8013e25524 Update license v2 (#67)
* Fixed license

* Update all licenses

* Update Dangerfile for new license

* Update already updated licenses

* Closer…

* Closer…

* Closer…

* Closer…

* Closer…

* Closer…

* Closer…

* Closer…

* Closer…

* Closer…

* Closer…
2017-04-24 16:59:57 -07:00
Garrett Moon
8c3775f5e2 Need to check availability before use of macros. (#3254)
* Need to check availability before use of macros.

* Get rid of PCH and enforce macro definition.

* Remove prefix

* Switch to global warning instead, much better.
2017-04-10 15:06:40 -07:00
Adlai Holler
d3d0f7be09 Add Support for the Run Loop Queue to be Weak (#3214)
* Add support for the run loop queue to be weak

* Go back to using a deque for itemsToProcess

* Update comment
2017-03-23 15:43:31 -07:00
Adlai Holler
740fc3f4c1 Make the run loop source context a stack object (#3213) 2017-03-23 15:42:15 -07:00
Adlai Holler
73ca6ab514 Shuffle & Cleanup Stuff (#3080) 2017-02-26 18:14:13 -08:00