Skip to content

Avoid unnecessary objects #1

Description

@andreazllin

From nitro docs: https://nitro.margelo.com/docs/performance-tips#avoid-unnecessary-objects

Avoid unnecessary objects

It is a common pattern to wrap everything in an object in JavaScript. In Nitro, every object gets it's own struct and has to be allocated. On iOS this performance impact is almost zero, but on Android the struct is a heap-allocation.

If you can, avoid unnecessarily wrapping everything in objects, and flatten the types out in the function signature

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions