Skip to content

Commit

Permalink
Reduce startup time. (TextureGroup#1292)
Browse files Browse the repository at this point in the history
Move file scope constant that is initialized at startup to function scope to avoid startup hit.
  • Loading branch information
dmaclach authored and maicki committed Jan 15, 2019
1 parent 2d43f46 commit e59eff8
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions Source/ASDisplayNode.mm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -289,7 +288,7 @@ - (void)_initializeInstance


_contentsScaleForDisplay = ASScreenScale();
_drawingPriority = ASDefaultDrawingPriority;
_drawingPriority = ASDefaultTransactionPriority;

_primitiveTraitCollection = ASPrimitiveTraitCollectionMakeDefault();

Expand Down

0 comments on commit e59eff8

Please sign in to comment.