From e59eff8aa0ebc4c354645123173e81993a8264d8 Mon Sep 17 00:00:00 2001 From: dmaclach Date: Tue, 15 Jan 2019 08:56:43 -0800 Subject: [PATCH] Reduce startup time. (#1292) Move file scope constant that is initialized at startup to function scope to avoid startup hit. --- Source/ASDisplayNode.mm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Source/ASDisplayNode.mm b/Source/ASDisplayNode.mm index a9a118f85..b64bed8e3 100644 --- a/Source/ASDisplayNode.mm +++ b/Source/ASDisplayNode.mm @@ -59,7 +59,6 @@ #define ENABLE_NEW_EXIT_HIERARCHY_BEHAVIOR 0 static ASDisplayNodeNonFatalErrorBlock _nonFatalErrorBlock = nil; -NSInteger const ASDefaultDrawingPriority = ASDefaultTransactionPriority; // Forward declare CALayerDelegate protocol as the iOS 10 SDK moves CALayerDelegate from an informal delegate to a protocol. // We have to forward declare the protocol as this place otherwise it will not compile compiling with an Base SDK < iOS 10 @@ -289,7 +288,7 @@ - (void)_initializeInstance _contentsScaleForDisplay = ASScreenScale(); - _drawingPriority = ASDefaultDrawingPriority; + _drawingPriority = ASDefaultTransactionPriority; _primitiveTraitCollection = ASPrimitiveTraitCollectionMakeDefault();