Skip to content

Memory usage when setting borderWidth style prop #22488

@FranDepascuali

Description

@FranDepascuali

Environment

Run react-native info in your terminal and paste its contents here.

  React Native Environment Info:
    System:
      OS: macOS High Sierra 10.13.6
      CPU: x64 Intel(R) Core(TM) i7-4770HQ CPU @ 2.20GHz
      Memory: 109.26 MB / 16.00 GB
      Shell: 5.3 - /bin/zsh
    Binaries:
      Node: 10.9.0 - /usr/local/bin/node
      npm: 6.4.1 - /usr/local/bin/npm
    SDKs:
      iOS SDK:
        Platforms: iOS 12.1, macOS 10.14, tvOS 12.1, watchOS 5.1
    IDEs:
      Xcode: 10.1/10B61 - /usr/bin/xcodebuild
    npmPackages:
      react: 16.4.2 => 16.4.2
      react-native: neiker/react-native#3ed7bc7bce0375effbc0d4b5e18842c3b3852e4c => 0.56.0
    npmGlobalPackages:
      eslint-plugin-react-native: 3.2.1
      react-native-cli: 2.0.1

Description

When using borderWidth prop in a view style, there is a spike in ram memory consumption. We have several components (~60) rendered with this prop. Thus crashes the app because of the suddenly high memory consumption.

Screencast

memory-leak-borderwidth

Screenshot

screen shot 2018-12-03 at 14 52 36

Reproducible Demo

This is a tricky one, try using a lot of views with borderWidth. #22221 related

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugStaleThere has been a lack of activity on this issue and it may be closed soon.

    Type

    No type
    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