14 Commits

Author SHA1 Message Date
Adlai Holler
dbe3b1bd71 Remove block copying (#2438) 2016-10-20 12:53:25 -07:00
appleguy
dec9e4e836 [ASDeallocQueue] Fix teardown of thread (doesn't currently happen due to singleton). (#2410)
Although this didn't occur _currently_, the code was incorrect and needs to be fixed.
2016-10-18 09:07:29 -07:00
appleguy
0a5c1f43a8 [ASRunLoopQueue - Performance] Add ASDeallocQueue for efficient object teardown. (#2399)
* [ASRunLoopQueue - Performance] Add ASDeallocQueue for efficient object teardown.

This measurably reduces block overhead and context switching.  In the layout benchmark,
it increases ops/s while actually reducing CPU utilization.  This suggests that we are
now at a lock-bounded local maximum, at least for tri-core devices.

* [ASDeallocQueue] Update convenience helper method and adopt in ASImageNode etc.

* [ASDeallocQueue] Reimplement the queue using a timer-based runloop.

* [Debugging] Re-enable ASDisplayNode Event Log.

* [ASDeallocQueue] Final refinements, comments, code minimization.

* [ASDeallocQueue] Fix for lock release needed in early return (refactoring typo from last commit)
2016-10-17 12:24:11 -07:00
appleguy
4595ebc06e [ASLog] Add new ASProfilingSignpost defines for System Trace flags. (#2370)
* [Debugging / Profiling] Add kdebug_signpost calls to Range and DataController.

* [ASLog] Add new ASProfilingSignpost defines for System Trace flags.

* [ASLog] Improve kdebug_signpost logging: ASRunloopQueue and AsyncDisplay, and colors.
See https://github.com/facebook/AsyncDisplayKit/pull/2370 for screenshots.
2016-10-13 10:31:22 -07:00
Hannah Troisi
4baf9bdbfe [Infer] Fix Infer errors/warnings (#1938)
* [Infer] Fix 11 Infer errors/warnings

* fix build error
2016-07-16 15:29:24 -07:00
Hannah Troisi
c857e809f4 Clean up header comments (for consistent Facebook licensing info) (#1741)
[Licensing] Clean up header comments (for consistent Facebook licensing info)
2016-06-11 23:31:39 -07:00
Michael Schneider
4207e0e1a6 Add CFRunLoopWakeUp in processQueue 2016-03-22 20:19:17 -07:00
Michael Schneider
a937184a0b Remove CFRunLoopWakeUp in CFRunLoop observer callback
We don't nee CFRunLoopWakeUp as at this time are currently running in an observer callback, and after running all of the BeforeWaiting observers it must surely check for more sources / etc to run before determining if it will sleep
2016-03-21 17:10:29 -07:00
Michael Schneider
b3e98e9f5f If the queue is not fully drained yet force another run loop to process next batch of items 2016-03-21 16:58:39 -07:00
Michael Schneider
14b9df30a3 Create CFRunLoopSourceContext via calloc 2016-03-18 14:32:45 -07:00
Michael Schneider
d1756baae7 Add custom run loop source to signal if new jobs are enqueued in ASRunLoopQueue
It is not guaranteed that the runloop will turn if it has no scheduled work, and this causes processing of the queue to stop. Attaching a custom loop source to the run loop and signal it if new work needs to be done
2016-03-18 14:02:27 -07:00
Eric Jensen
33fda7ab49 - Use modern Objective-C syntax.
-  Simplify comparisons.
-  Remove dead stores.
2016-03-15 22:34:29 -07:00
Scott Goodson
06ea9461cb [ASScrollDirection] Fix tests to use the more intuitive naming for scroll directions. 2016-03-08 22:48:02 -08:00
Rahul Malik
f388180a1d Refactor the run loop implementation code into a proper queue abstraction.
ASRunLoopQueue can process a specified number of items per run loop iteration
via a block based api.
2016-03-07 23:49:50 -08:00