From dd7d2d86067290a0f7911c488913d79fcde2b578 Mon Sep 17 00:00:00 2001 From: Website Deployment Script Date: Fri, 10 Feb 2017 01:25:30 +0000 Subject: [PATCH] Updated docs for next --- releases/next/docs/performance.html | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/releases/next/docs/performance.html b/releases/next/docs/performance.html index 6d5dee6e349..639613b3993 100644 --- a/releases/next/docs/performance.html +++ b/releases/next/docs/performance.html @@ -46,13 +46,7 @@ so they are not interrupted by frame drops on the JavaScript thread. anyways.

Similarly, you can happily scroll up and down through a ScrollView when the JavaScript thread is locked up because the ScrollView lives on the main thread (the scroll events are dispatched to the JS thread though, -but their receipt is not necessary for the scroll to occur).

Common sources of performance problems #

Console.log statements #

When running a bundled app, these statements can cause a big bottleneck in the JavaScript thread. This includes calls from debugging libraries such as redux-logger, so make sure to remove them before bundling.

There is a babel plugin that can remove all console.* calls. You need to install it first using npm install babel-plugin-transform-remove-console --save, and then edit (or create) .babelrc under your project directory like the following:

{ - "env": { - "production": { - "plugins": ["transform-remove-console"] - } - } -}

Then it will automatically remove all console.* calls in a release (production) version of your project. However, the console.* calls will still be executed in the debug version of your project.

Development mode (dev=true) #

JavaScript thread performance suffers greatly when running in dev mode. +but their receipt is not necessary for the scroll to occur).

Common sources of performance problems #

Console.log statements #

When running a bundled app, these statements can cause a big bottleneck in the JavaScript thread. This includes calls from debugging libraries such as redux-logger, so make sure to remove them before bundling.

Development mode (dev=true) #

JavaScript thread performance suffers greatly when running in dev mode. This is unavoidable: a lot more work needs to be done at runtime to provide you with good warnings and error messages, such as validating propTypes and various other assertions.

Slow navigator transitions #

As mentioned above, Navigator animations are controlled by the