mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-05-18 12:22:20 +08:00
Allow RCTDisplayLink to pause more often
Summary: By default we run the the JS display link, even if there are no modules listening. Given that most listeners will be lazily constructed, let's make it paused by default. Since RCTTiming almost never unpauses due to some long-lived timers, implement a sleep timer that pauses the displaylink but uses an NSTimer to wake up in time. Reviewed By: mhorowitz Differential Revision: D3235044 fbshipit-source-id: 4a340fea552ada1bd8bc0d83b596a7df6f992387
This commit is contained in:
committed by
Facebook Github Bot 4
parent
4840233bcd
commit
7b718b03eb
@@ -426,7 +426,7 @@ SEL RCTParseMethodSignature(NSString *methodSignature, NSArray<RCTMethodArgument
|
||||
|
||||
- (NSDictionary *)profileArgs
|
||||
{
|
||||
if (_profileArgs) {
|
||||
if (!_profileArgs) {
|
||||
// This sets _selector
|
||||
[self processMethodSignature];
|
||||
_profileArgs = @{
|
||||
|
||||
Reference in New Issue
Block a user