Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FlatList - while list is scrolling/rendering items the JS thread is blocked, onPress are super delayed. #12884

Closed
grundmanise opened this issue Mar 12, 2017 · 63 comments
Labels
Ran Commands One of our bots successfully processed a command. Resolution: Locked This issue was locked by the bot.

Comments

@grundmanise
Copy link

grundmanise commented Mar 12, 2017

Description

While FlatList is scrolling and/or rendering items the JS thread is blocked.. any events (onPress etc) on TocuchableWhatever are ingored or processed after FlatList finishes rendering. How can I pause FlatList rendering and process onPress?

Content rendered by FlatList while scrolling uses InteractionManager so if you want to pause it you just need to create an interaction handle. (c) @sahrens

I've tried that on my ListItem:

export default class ListItem extends Component { 

    shouldComponentUpdate() {
        return false;
    }

    render() {
        const {item} = this.props;

        return (
                <TouchableHighlight style={styles.item} underlayColor='rgba(255,255,255,.3)' activeOpacity={0.7} onPress={this._onPress}>
                     <View style={styles.row}>
                        <Image style={styles.image} source={{ uri: item.imgUrl}} />
                        <View style={styles.details}>
                            <BaseText style={styles.caption} weight={600}>{item.caption}</BaseText>
                            <BaseText style={styles.points}>{item.points} points</BaseText>
                        </View>
                        <TouchableOpacity hitSlop={{top: 10, left: 10, right: 10, bottom: 10}} >
                            <Icon style={styles.icon} name={item.favorite ? 'heart' : 'heart-outline'} size={24} color={'white'} />
                        </TouchableOpacity>
                    </View>
                </TouchableHighlight>
                )
    }

    _onPress = () => {
        const handle = InteractionManager.createInteractionHandle();
        this.props.onPress(this.props.item.key);
        InteractionManager.clearInteractionHandle(handle);
    }

}

but it does not fix the issue.
Am I doing it wrong?

Additional Information

  • React Native version: 0.42.0
  • Platform: tired only on iOS (device)
  • Operating System: MacOS
  • Dev tools: Xcode
@grundmanise grundmanise changed the title FlatList while list is scrolling & rendering items the JS thread is blocked, onPress are super delayed. FlatList - while list is scrolling & rendering items the JS thread is blocked, onPress are super delayed. Mar 12, 2017
@grundmanise grundmanise changed the title FlatList - while list is scrolling & rendering items the JS thread is blocked, onPress are super delayed. FlatList - while list is scrolling/rendering items the JS thread is blocked, onPress are super delayed. Mar 12, 2017
@sahrens
Copy link
Contributor

sahrens commented Mar 12, 2017 via email

@pocesar
Copy link

pocesar commented Mar 13, 2017

for me, around 70 items, all with same height, had to change TouchableOpacity for TouchableWithoutFeedback, was getting 4-5 second delay for the press to happen (on Android)

@grundmanise
Copy link
Author

Can you describe more precisely the problem you're seeing?
When FlatList is scrolled (some items are rendered, but still renders offscreen items) and I press on any already rendered item the press is ignored/or is delayed few sec/or TouchableHighlight laggs: underlayColor is visible for few seconds. When I scroll and wait few sec (till it finishes rendering items batch) - everything ok.
How much of a delay is there when you press the button?
No on press event is fired at all and I have to press several times before ListItem becomes responsive. Sometimes TouchableHighlight laggs: underlayColor is visible for few seconds.
In the perf monitor I see that JS FPS is <10 - list is rendering offscreen items(?).
If you let it sit for a bit before pressing, is there any delay?
Almost no delay. Everything works as expected.
Or only if you just finished scrolling?
"just finished scrolling" - as described above - there is a noticeable delay.
What is triggered by the onpress?
Nothing, empty fn.

ListView - no issue.

import React, { PureComponent } from 'react'
import { View, StyleSheet, InteractionManager } from 'react-native'
import { colors,  componentSpecific } from 'src/theme'
import FlatList from 'react-native/Libraries/Experimental/FlatList';
import ListItem from './ListItem'

const { slider, list } = componentSpecific;

const viewabilityConfig = {
  minimumViewTime: 3000,
  viewAreaCoveragePercentThreshold: 100,
  waitForInteraction: true,
};

export default class List extends PureComponent {

    render() {
        return (
            <FlatList
                SeparatorComponent={this._renderSeparatorComponent}
                data={this.props.data}
                getItemLayout={this._getItemLayout}
                key={'List'}
                legacyImplementation={false}
                numColumns={1}
                //onRefresh={this._onRefresh}
                ref={(ref) => { this._listRef = ref; }}
                refreshing={false}
                renderItem={this._renderItemComponent}
                shouldItemUpdate={this._shouldItemUpdate}
                viewabilityConfig={viewabilityConfig}
                keyExtractor={this._keyExtractor}

                // ScrollView props
                directionalLockEnabled={true}

                style={styles.list}
            />
        )
    }

    _renderItemComponent = ({item}) => {
        return (
            <ListItem item={item} onPress={this._pressItem}/>
        )
    }

    _renderSeparatorComponent = () => {
        return (
            <View style={styles.separator} />
        )
    }

    _shouldItemUpdate = (prev, next) => {
        return prev.item !== next.item;
    }

    _getItemLayout = (data, index) => {
        return { length: list.itemHeight, offset: (list.itemHeight + list.separatorHeight) * index, index }
    }

    _keyExtractor = (item) => {
        return item.id.toString();
    }

    _pressItem = (water) => {
   
    }

}
const styles = StyleSheet.create({
    list: {
        flex: 1,
    },
    separator: {
        height: list.separatorHeight,
        backgroundColor: 'white',
        opacity: 0.3,
    },
});

@sahrens
Copy link
Contributor

sahrens commented Mar 13, 2017

Hmm, worrisome. Do you see any similar issues with FlatListExample in the UIExplorer?

@sahrens
Copy link
Contributor

sahrens commented Mar 13, 2017

Some other debugging tools:

  • set debug={true} on the FlatList and see if anything looks weird
  • call InteractionStallDebugger.install in init

@grundmanise
Copy link
Author

grundmanise commented Mar 13, 2017

Just a tiny delay in FlatListExample in UIExplorer. It is a neglectable delay compared to one in my app.
I also see < 10 fps in FlatListExample sometimes , but still there is just a tiny delay.

@sahrens
Copy link
Contributor

sahrens commented Mar 14, 2017

Oh, how are you updating your data prop? Do you maintain immutability of your items? Does your shouldItemUpdate ever return false?

@sahrens
Copy link
Contributor

sahrens commented Mar 14, 2017

There is also a "performance" option in the inspector that might help.

@grundmanise
Copy link
Author

data pop is coming from a container component which is tied to the redux. The data is static for now.

Can't find InteractionStallDebugger in RN 0.42.0 /Libraries/Interaction.

shouldItemUpdate always return false.

Setting debug={true} gives me a red screen error:

'Tried to get frame for out of range index 0' __getFrameMetrics VirtualizedList.js:652:14

Don't know why, becuase I don't render FlatList if the data is empty:

    render() {
        if (!this.props.data) {
            return (
                <SpinnerOverlay text={'Loading...'}/>
            )
        }

        return (
            <FlatList
                SeparatorComponent={this._renderSeparatorComponent}
                data={this.props.data}
                getItemLayout={this._getItemLayout}
                key={'List'}
                legacyImplementation={false}
                numColumns={1}
                //onRefresh={this._onRefresh}
                ref={(ref) => { this._listRef = ref; }}
                refreshing={false}
                renderItem={this._renderItemComponent}
                shouldItemUpdate={this._shouldItemUpdate}
                viewabilityConfig={viewabilityConfig}
                keyExtractor={this._keyExtractor}

                // ScrollView props
                directionalLockEnabled={true}

                //debug
                debug={true}

                style={styles.list}
            />
        )
    }

@grundmanise
Copy link
Author

I want to better describe what behaviour I am experiencing:

When FlatList was just scrolled and stopped (wtih a finger) first few taps on the ListItem are ignored, the same is in the FlatListExample in UIExplorer, but there FlatList items are rendered faster and only the 1st tap on the ListItem is ignored. My ListItems are a bit "heavier" and it could take several taps before they become responsive. Although if you wait ~1.5s seconds after scrolling fully stops - everything ok. So I think the problem is with a "heavier" items, that are taking longer to load.

I have 75 items in my list.

P.S.
What is the best way to push a screen on the ListItem press?

    _pressItem = (data) => {
        //const handle = InteractionManager.createInteractionHandle(); <-- will it help with performance issues?

        //this._listRef.recordInteraction(); <-- when should we call it? What is it for?
        // Push screen
        this.props.onListItemPress(data);

        //InteractionManager.clearInteractionHandle(handle);

    }

@sahrens
Copy link
Contributor

sahrens commented Mar 14, 2017

https://github.com/facebook/react-native/blob/master/Libraries/Interaction/InteractionStallDebugger.js

You could potentially grab the interaction handle earlier, for example when scrolling stops or in onResponderGrant or shouldSetResponder.

You can also try mucking with the advanced props from VirtualizedList like the windowSize, updateCellsBatchingPeriod, and maxToRenderPerBatch

Not sure what you're asking about pushing a screen there are many navigation options out there but I think react-navigation is recommended?

@grundmanise
Copy link
Author

thnx, I'll try InteractionStallDebugger and let you know.

Sorry for the confusion. I already use RNN. Let me rephrase my question:
Should I call InteractionManager.createInteractionHandle and/or recordInteraction() when the only thing that I am doing in the onPress is calling navigator.push({...params})?
Do I need interaction handle in this scenario at all? Do you think it can help with ListItem responsiveness issues?


You can also try mucking with the advanced props from VirtualizedList like the windowSize, updateCellsBatchingPeriod, and maxToRenderPerBatch

I'll try it and let you know.

Although what exactly waitForInteraction does? It wait's for interactions before doing what? May you explain a bit more?

@grundmanise
Copy link
Author

grundmanise commented Mar 14, 2017

May you provide an example on how to grab an interaction handle in onResponderGrant or shouldSetResponder?

@grundmanise
Copy link
Author

@sahrens so I ended up setting maxToRenderPerBatch={1} it gives me worse fill rate, but a lot better perfomance..

Thanks for your help.

Can't wait when the cell reuse will be implemented natively.... it will be a huge step forward in performance and UX.

@sahrens
Copy link
Contributor

sahrens commented Mar 15, 2017

Yeah, it is is pretty tricky balancing memory, fill rate, responsiveness, and frame rate but we'll keep optimizing!

@gregblass
Copy link

gregblass commented Jun 9, 2017

Getting the same issue. ~100 records, about a 1.5s delay. I can tap around 7 times during that time while the list is being rendered before I can navigate to the next stack.

EDIT: Nevermind, its definitely something with my settings. Narrowing down now...

EDIT 2: Its my search bar that I'm passing into ListHeaderComponent. Changing that to a PureComponent didn't make any difference. Strange.

EDIT 3: Yeah, as soon as my ListHeaderComponent has a height to it (and renders), I get a significant delay.

Performance breaks down around ~50 records or so.

@cdreier
Copy link

cdreier commented Jun 27, 2017

Hi, we experience similar issues.

  • js thread drops heavily (to -2 Oo) when start scrolling
  • touches on items gets lost / are heavily delayed
  • using redux-observables with apollo-client to load more items with onEndReached
  • i think we follow all the performance guidelines (PureComponents, initialListSize)

after spending all the day searching for a solution, i try to reproduce this issue in an example app, perhaps there is a performance bottleneck while running http requests?

@wouteralberts
Copy link

wouteralberts commented Jun 30, 2017

Having same issue as @gregblass; the simplest ListHeaderComponent (<View style={ {backgroundColor: 'lime', height: 50} }/>) causes a 4s delay. My list contains 100 items.

Delay is gone once I remove the header.

@gregblass
Copy link

Yep! This is a regression introduced in 0.45. As soon as the Expo Snack supports 0.45, I can prove it.

But anyone can make this happen themselves by making a flat list with 50+ items and adding literally anything to the header component in 0.45.

@jpokrzyk
Copy link

jpokrzyk commented Aug 7, 2017

@gregblass @wouteralberts I have the same issue in my app. When I render a large observable collection in a SectionList with a ListHeaderComponent it takes forever.

But when I tried to reproduce it in a new vanilla project, I couldn't do it. Are either of you using the legacy navigator? It seems like the Navigator might be the variable. I'm only getting the delay when I nav to the scene through the navigator.

We're switching to React Navigation in the very near future. I'll try and remember to update this post with the results.

@wouteralberts
Copy link

@jpokrzyk Interesting. I do indeed use the Navigator from react-native-deprecated-custom-components.

If React Navigation fixes this for you, I may follow a similar upgrade path.

@cbjs
Copy link

cbjs commented Aug 16, 2017

same

@alkanyunus
Copy link

My problem is worst than yours. On android touch event(onPress) never work.
On android console the log I'm always getting:
"E/unknown:ReactNative: Got DOWN touch before receiving UP or CANCEL from last gesture"

navigator: Wix react-native-navigation

Flatlist -> ListItem(onPress)

@wellyshen
Copy link

wellyshen commented Sep 21, 2017

I have the same issue. When items in FlatList are scrolling, my touch events are blocking (TouchableHighlight no response).

I'm wondering. How's the progress of this issue?

@wellyshen
Copy link

wellyshen commented Oct 7, 2017

@sahrens May I know the process of the optimizing of this issue. I use FlatList to render 40 - 50 items the initial rendering performance is great, but the down-side is the action responsive got blocking while items are being scrolled. Which will cause very bad UX for user. But if I switch back to ScrollView the initial rendering performance also cause bad UX for user. So, as a product creator and developer. these trading off really bothering me :(

@arufian
Copy link

arufian commented Jan 10, 2018

Hi All, did you already used requestAnimationFrame mixups to solve this issue ?

@mytc
Copy link

mytc commented Jan 11, 2018

@arufian , tried, not work.

Seriously, is it a NR problem or our implementation? Doesn't seem affects all other people though.

@ChrisLahaye
Copy link

@TGPSKI many thanks for your patch. It improvements user interaction on scenes having lists significantly.

@wellyshen I would advice against using @bolan9999 package, it gave me many null pointer exceptions when using data refresh functionality. Simply not quality or production-ready code.

@mytc
Copy link

mytc commented Jan 20, 2018

I end up using recyclerlistview. It's working great.

@XenorPLxx
Copy link

I've just posted on SO with similar issue, as solutions provided here don't really help my case.
https://stackoverflow.com/questions/48626555/figuring-out-performance-issues

@motasemobe
Copy link

motasemobe commented Feb 23, 2018

I spent hours working around this issue i end up switching to DEV=FALSE and the issue disappeared

@react-native-bot
Copy link
Collaborator

Thanks for posting this! It looks like you may not be using the latest version of React Native, v0.53.0, released on January 2018. Can you make sure this issue can still be reproduced in the latest version?

I am going to close this, but please feel free to open a new issue if you are able to confirm that this is still a problem in v0.53.0 or newer.

How to ContributeWhat to Expect from Maintainers

@react-native-bot react-native-bot added Ran Commands One of our bots successfully processed a command. Stale There has been a lack of activity on this issue and it may be closed soon. labels Feb 24, 2018
@stale stale bot removed the Stale There has been a lack of activity on this issue and it may be closed soon. label Feb 24, 2018
@312362115
Copy link

still in v0.53.0

@DavitVosk
Copy link

The same problem here. I don't understand why this issue is closed if the problem is still active? Is there any solution for this?

@wellyshen
Copy link

No the problem still exist.

@louisiscoding
Copy link

It is still a pain in the ass to make a simple FlatList with 100+ Selectable Image.
This is a very common pattern, i'm surprised it is that hard to implement 🙄

@reza7rm
Copy link

reza7rm commented Mar 27, 2018

The problem still exists and on the nerve !:|

@lsiden
Copy link

lsiden commented Apr 10, 2018

I had this problem too. This component gets its list from the Redux store. When the user scrolls the list, it requests the next 10 film titles to append to the list.

Each time a request for more titles is resolved, it created a new list with something like [...oldList, ...newList], as I had learned to do when modifying the redux state. This caused the FlatList to re-render everything including items previous items, even though my item component extends React.PureComponent.

I modified the reducer appended additional data from the same query to the original list without creating a new list. Now, it renders only the new entries. The delay after appending to the list in response to scrolls is no longer noticable. There is still a 1-2 second delay until items will respond to touches when it renders the first screenful of items after a new query, but I don't think that will be an issue for casual users.

I also set maxToRenderPerBatch={2} but I can no longer perceive a difference in performance.

Here's my FlatList:

<FlatList
  data={films}
  renderItem={renderItem}
  keyExtractor={item => item.imdbID}
  ListHeaderComponent={<Header totalResults={totalResults} />}
  ListFooterComponent={<Footer />}
  onEndReached={() => dispatchFetchPage()}
  initialNumToRender={8}
  maxToRenderPerBatch={2}
  onEndReachedThreshold={0.5}
/>

I previously had defined the getItemLayout prop, but found that it made now difference to performance when I removed it.

@dereknelson
Copy link

dereknelson commented Apr 24, 2018

My flatlist (and sectionlist) have a header component. I am console logging both the render method and the header method, and though nothing is being rerendered, it seems the header is being rerendered as I scroll screenshot.
Note:

  1. the data that the section list relies on never changes
  2. render item is a pure component
    Here's my relevant code:
    (in render method)
<SectionList 
sections={this.state.alphabet}
keyboardShouldPersistTaps="always"
initialNumToRender={12}
ref={ref => this.list = ref}
keyExtractor={(item, index) => item.uuid}
renderItem={this.renderItem}
ListHeaderComponent={this.profileScreenHeader}
removeClippedSubviews
SectionSeparatorComponent={this.separator}
getItemLayout={(data, index) => ({
    length: 53, offset: 53 * index, index
})} />

(in rest of class)

    profileScreenHeader = () => {
        console.log('header rerender',)        
        return (
            <View>
                <this.SearchBar/>
                { this.state.searching ? null : <this.GroupsFlatlist/> }
                <this.friendsHeader/>
            </View>
        )
    }

    SearchBar = () => {
            return (
                <View style={{ flexDirection: 'row', alignItems: 'center', borderColor: Colors.grayColor, borderWidth: StyleSheet.hairlineWidth, }}>
                    <TextInput
                        style={{ width: width * .95, backgroundColor: 'white', paddingLeft: 15, fontSize: 18, paddingVertical: 15 }}
                        value={this.state.searchText}
                        ref={ref => this.textInput = ref}
                        onChangeText={this.setSearchText}
                        placeholder='Search friends'
                        autoCapitalize={'none'}
                        autoCorrect={false}
                        clearButtonMode="while-editing"
                    />
                </View>
            )
        }

@lsiden
Copy link

lsiden commented Apr 30, 2018

@prodigynelson, as it is now, every time state changes, everything will re-render. I would try converting the header and all it's sub-components into pure components that depend only on properties, not state. Subclass them from React.PureComponent which defines shouldComponentUpdate() with a shallow comparison of properties, which I think is what you want. Let me know if that helps.

@dereknelson
Copy link

@lsiden I changed it from ListHeaderComponent={this.profileScreenHeader} to ListHeaderComponent={this.profileScreenHeader()} and that prevented it rerendering as it scrolled.

facebook-github-bot pushed a commit that referenced this issue Jun 16, 2018
Summary:
This sync includes the following changes:
- **[ae14317d6](facebook/react@ae14317d6)**: Inline fbjs/lib/emptyFunction (#13054) //<Dan Abramov>//
- **[72434a768](facebook/react@72434a768)**: Remove or inline some fbjs dependencies (#13046) //<Dan Abramov>//
- **[64c54edea](facebook/react@64c54edea)**: Adding movementX and movementY to synthenticMouseEvent fixes #6723 (#9018) //<Jason Williams>//
- **[9bd4d1fae](facebook/react@9bd4d1fae)**: Synchronously restart when an error is thrown during async rendering (#13041) //<Andrew Clark>//
- **[9bda7b28f](facebook/react@9bda7b28f)**: Suspended high pri work forces lower priority work to expire early  (#12965) //<Andrew Clark>//
- **[2e7577907](facebook/react@2e7577907)**: Fix incorrect data in compositionend event with Korean IME on IE11 (#10217) (#12563) //<Crux>//
- **[bc963f353](facebook/react@bc963f353)**: setJSResponder in Fabric renderer (#13031) //<Sebastian Markbåge>//
- **[051637da6](facebook/react@051637da6)**: Extract Fabric event handlers from canonical props (#13024) //<Sebastian Markbåge>//
- **[2a8085980](facebook/react@2a8085980)**: Remove rAF fork (#12980) //<Flarnie Marchan>//
- **[e0c78344e](facebook/react@e0c78344e)**: Retry on error if there's lower priority pending work (#12957) //<Andrew Clark>//
- **[9725065eb](facebook/react@9725065eb)**: Update bundle sizes for 16.4.1 release //<Dan Abramov>//
- **[0b87b2790](facebook/react@0b87b2790)**: Updating package versions for release 16.4.1 //<Dan Abramov>//
- **[036ae3c6e](facebook/react@036ae3c6e)**: Use native event dispatching instead of Simulate or SimulateNative (#13023) //<Philipp Spieß>//
- **[945fc1bfc](facebook/react@945fc1bfc)**: Call gDSFP with the right state in react-test-render (#13030) //<Rafał Ruciński>//
- **[392530104](facebook/react@392530104)**: Remove feature flag around 'getDerivedStateFromProps' bug fix (#13022) //<Flarnie Marchan>//
- **[1594409fa](facebook/react@1594409fa)**: Scheduler depends on common packages (#13020) //<Dan Abramov>//
- **[d5c11193e](facebook/react@d5c11193e)**: Added production profiling bundle type (#12886) //<Brian Vaughn>//
- **[ec60457bc](facebook/react@ec60457bc)**: Popping context is O(1) in SSR (#13019) //<Dan Abramov>//
- **[30bc8ef79](facebook/react@30bc8ef79)**: Allow multiple root children in test renderer traversal API (#13017) //<Dan Abramov>//
- **[d480782c4](facebook/react@d480782c4)**: Don’t error when returning an empty Fragment (#12966) //<Philipp Spieß>//
- **[4ac6f133a](facebook/react@4ac6f133a)**: Fallback to event.srcElement for IE9 (#12976) //<Nathan Hunzaker>//
- **[23be4102d](facebook/react@23be4102d)**: Fixed an issue with nested contexts unwinding when server rendering. Issue #12984 (#12985) //<Eric Soderberg>//
- **[d0d428064](facebook/react@d0d428064)**: Remove old reference to inst._wrapperState (#12987) //<Nathan Hunzaker>//
- **[c78957eac](facebook/react@c78957eac)**: Fix an SVG focusing crash in IE11 (#12996) //<Jifa Jiang>//
- **[bfb12ebb5](facebook/react@bfb12ebb5)**: delete a couple of redundant lines in performWorkOnRoot() in ReactFiberScheduler.js (#13003) //<Nathan Quarles>//
- **[394b17eed](facebook/react@394b17eed)**: Update custom renderer docs //<Dan Abramov>//
- **[188c4252a](facebook/react@188c4252a)**: Fix react-dom ReferenceError requestAnimationFrame in non-browser env (#13000) (#13001) //<Ivan Babak>//
- **[9cf3733a9](facebook/react@9cf3733a9)**: update comment in computeAsyncExpiration() to reflect code (#12994) //<Nathan Quarles>//
- **[c5a733e1e](facebook/react@c5a733e1e)**: Fix links of docs on the comment (#12795) //<Ende93>//
- **[36546b513](facebook/react@36546b513)**: Set the correct initial value on input range (#12939) //<Maxime Nory>//
- **[15767a8f8](facebook/react@15767a8f8)**: [scheduler] 5/n Error handling in scheduler (#12920) //<Flarnie Marchan>//
- **[3118ed9d6](facebook/react@3118ed9d6)**: Expose unstable_interactiveUpdates on ReactDOM (#12943) //<Andrew Clark>//
- **[524a74331](facebook/react@524a74331)**: Fix for Flow issues in SimpleCacheProvider (#12942) //<Flarnie Marchan>//
- **[ae57b125c](facebook/react@ae57b125c)**: [simple-cache-provider] Use LRU cache eviction (#12851) //<Andrew Clark>//
- **[e0a03c1b4](facebook/react@e0a03c1b4)**: Extend input type check in selection capabilities (#12062) (#12135) //<Spyros Ioakeimidis>//
- **[79a740c6e](facebook/react@79a740c6e)**: Rename variables to remove references to 'global' global (#12931) //<Flarnie Marchan>//
- **[ff724d3c2](facebook/react@ff724d3c2)**: [scheduler] 4/n Allow splitting out `schedule` in fb-www, prepare to fix polyfill issue internally (#12900) //<Flarnie Marchan>//
- **[83f76e4db](facebook/react@83f76e4db)**: ForwardRefs supports propTypes (#12911) //<Brian Vaughn>//
- **[8aeea5afa](facebook/react@8aeea5afa)**: Do not assign node.value on input creation if no change will occur (#12925) //<Nathan Hunzaker>//
- **[aa85b0fd5](facebook/react@aa85b0fd5)**: Upgrade to Jest 23 (#12894) //<Simen Bekkhus>//
- **[61777a78f](facebook/react@61777a78f)**: [scheduler] 3/n Use a linked list instead of map and queue for callback storage (#12893) //<Flarnie Marchan>//
- **[e7bd3d59a](facebook/react@e7bd3d59a)**: No longer expose ReactNativeComponentTree (#12904) //<Sebastian Markbåge>//
- **[f35d989be](facebook/react@f35d989be)**: TestRenderer warns if flushThrough is passed the wrong params (#12909) //<Brian Vaughn>//
- **[557870067](facebook/react@557870067)**: Record "actual" times for all Fibers within a Profiler tree (alt) (#12910) //<Brian Vaughn>//
- **[76e07071a](facebook/react@76e07071a)**: [scheduler] 2/n Adding 'schedule' fixture (#12884) //<Flarnie Marchan>//
- **[345e0a71a](facebook/react@345e0a71a)**: Improve tests for 'schedule' module (#12880) //<Flarnie Marchan>//
- **[8765d6089](facebook/react@8765d6089)**: Update bundle sizes for 16.4.0 release //<Andrew Clark>//
- **[d427a563d](facebook/react@d427a563d)**: Updating package versions for release 16.4.0 //<Andrew Clark>//
- **[53852a887](facebook/react@53852a887)**: add functional components warning about legacy context api (#12892) //<Chang Yan>//
- **[fe747a51c](facebook/react@fe747a51c)**: Add React.Timeout to getComponentName (#12890) //<Toru Kobayashi>//
- **[c601f7a64](facebook/react@c601f7a64)**: add siblings Timeout components test case (#12862) //<Chang Yan>//
- **[735035837](facebook/react@735035837)**: add legacy context API warning in strict mode (#12849) //<Chang Yan>//
- **[e88579184](facebook/react@e88579184)**: Fix a regression that caused us to listen to extra events at the top (#12878) //<Dan Abramov>//
- **[7c0aca289](facebook/react@7c0aca289)**: Rollup freeze: false (#12879) //<Brian Vaughn>//
- **[33289b530](facebook/react@33289b530)**: Tests and fixes for 'timing out' behavior (#12858) //<Flarnie Marchan>//
- **[ad27845cc](facebook/react@ad27845cc)**: Fix double-firing submit events (#12877) //<Sophie Alpert>//
- **[dd5fad296](facebook/react@dd5fad296)**: Update Flow to 0.70 (#12875) //<Dan Abramov>//
- **[13003654e](facebook/react@13003654e)**: Pass "start time" and "commit time" to Profiler callback (#12852) //<Brian Vaughn>//
- **[dc3b144f4](facebook/react@dc3b144f4)**: Treat Rollup "warnings" as errors (#12868) //<Dan Abramov>//
- **[d7b9b4921](facebook/react@d7b9b4921)**: Fix react native example links in README of 'react-reconciler' (#12871) //<Kevin (Kun) "Kassimo" Qian>//
- **[9bed4a6ae](facebook/react@9bed4a6ae)**: https in reactProdInvariant text (#12869) //<Sophie Alpert>//
- **[47b003a82](facebook/react@47b003a82)**: Resolve host configs at build time (#12792) //<Dan Abramov>//

Release Notes:
[GENERAL] [FEATURE] [React] - React sync for revisions c0fe8d6...ae14317

Reviewed By: bvaughn

Differential Revision: D8458731

fbshipit-source-id: afefaa50685d43e70c8ea85c70d2e29dee311cbb
grabbou pushed a commit that referenced this issue Jun 21, 2018
Summary:
This sync includes the following changes:
- **[ae14317d6](facebook/react@ae14317d6)**: Inline fbjs/lib/emptyFunction (#13054) //<Dan Abramov>//
- **[72434a768](facebook/react@72434a768)**: Remove or inline some fbjs dependencies (#13046) //<Dan Abramov>//
- **[64c54edea](facebook/react@64c54edea)**: Adding movementX and movementY to synthenticMouseEvent fixes #6723 (#9018) //<Jason Williams>//
- **[9bd4d1fae](facebook/react@9bd4d1fae)**: Synchronously restart when an error is thrown during async rendering (#13041) //<Andrew Clark>//
- **[9bda7b28f](facebook/react@9bda7b28f)**: Suspended high pri work forces lower priority work to expire early  (#12965) //<Andrew Clark>//
- **[2e7577907](facebook/react@2e7577907)**: Fix incorrect data in compositionend event with Korean IME on IE11 (#10217) (#12563) //<Crux>//
- **[bc963f353](facebook/react@bc963f353)**: setJSResponder in Fabric renderer (#13031) //<Sebastian Markbåge>//
- **[051637da6](facebook/react@051637da6)**: Extract Fabric event handlers from canonical props (#13024) //<Sebastian Markbåge>//
- **[2a8085980](facebook/react@2a8085980)**: Remove rAF fork (#12980) //<Flarnie Marchan>//
- **[e0c78344e](facebook/react@e0c78344e)**: Retry on error if there's lower priority pending work (#12957) //<Andrew Clark>//
- **[9725065eb](facebook/react@9725065eb)**: Update bundle sizes for 16.4.1 release //<Dan Abramov>//
- **[0b87b2790](facebook/react@0b87b2790)**: Updating package versions for release 16.4.1 //<Dan Abramov>//
- **[036ae3c6e](facebook/react@036ae3c6e)**: Use native event dispatching instead of Simulate or SimulateNative (#13023) //<Philipp Spieß>//
- **[945fc1bfc](facebook/react@945fc1bfc)**: Call gDSFP with the right state in react-test-render (#13030) //<Rafał Ruciński>//
- **[392530104](facebook/react@392530104)**: Remove feature flag around 'getDerivedStateFromProps' bug fix (#13022) //<Flarnie Marchan>//
- **[1594409fa](facebook/react@1594409fa)**: Scheduler depends on common packages (#13020) //<Dan Abramov>//
- **[d5c11193e](facebook/react@d5c11193e)**: Added production profiling bundle type (#12886) //<Brian Vaughn>//
- **[ec60457bc](facebook/react@ec60457bc)**: Popping context is O(1) in SSR (#13019) //<Dan Abramov>//
- **[30bc8ef79](facebook/react@30bc8ef79)**: Allow multiple root children in test renderer traversal API (#13017) //<Dan Abramov>//
- **[d480782c4](facebook/react@d480782c4)**: Don’t error when returning an empty Fragment (#12966) //<Philipp Spieß>//
- **[4ac6f133a](facebook/react@4ac6f133a)**: Fallback to event.srcElement for IE9 (#12976) //<Nathan Hunzaker>//
- **[23be4102d](facebook/react@23be4102d)**: Fixed an issue with nested contexts unwinding when server rendering. Issue #12984 (#12985) //<Eric Soderberg>//
- **[d0d428064](facebook/react@d0d428064)**: Remove old reference to inst._wrapperState (#12987) //<Nathan Hunzaker>//
- **[c78957eac](facebook/react@c78957eac)**: Fix an SVG focusing crash in IE11 (#12996) //<Jifa Jiang>//
- **[bfb12ebb5](facebook/react@bfb12ebb5)**: delete a couple of redundant lines in performWorkOnRoot() in ReactFiberScheduler.js (#13003) //<Nathan Quarles>//
- **[394b17eed](facebook/react@394b17eed)**: Update custom renderer docs //<Dan Abramov>//
- **[188c4252a](facebook/react@188c4252a)**: Fix react-dom ReferenceError requestAnimationFrame in non-browser env (#13000) (#13001) //<Ivan Babak>//
- **[9cf3733a9](facebook/react@9cf3733a9)**: update comment in computeAsyncExpiration() to reflect code (#12994) //<Nathan Quarles>//
- **[c5a733e1e](facebook/react@c5a733e1e)**: Fix links of docs on the comment (#12795) //<Ende93>//
- **[36546b513](facebook/react@36546b513)**: Set the correct initial value on input range (#12939) //<Maxime Nory>//
- **[15767a8f8](facebook/react@15767a8f8)**: [scheduler] 5/n Error handling in scheduler (#12920) //<Flarnie Marchan>//
- **[3118ed9d6](facebook/react@3118ed9d6)**: Expose unstable_interactiveUpdates on ReactDOM (#12943) //<Andrew Clark>//
- **[524a74331](facebook/react@524a74331)**: Fix for Flow issues in SimpleCacheProvider (#12942) //<Flarnie Marchan>//
- **[ae57b125c](facebook/react@ae57b125c)**: [simple-cache-provider] Use LRU cache eviction (#12851) //<Andrew Clark>//
- **[e0a03c1b4](facebook/react@e0a03c1b4)**: Extend input type check in selection capabilities (#12062) (#12135) //<Spyros Ioakeimidis>//
- **[79a740c6e](facebook/react@79a740c6e)**: Rename variables to remove references to 'global' global (#12931) //<Flarnie Marchan>//
- **[ff724d3c2](facebook/react@ff724d3c2)**: [scheduler] 4/n Allow splitting out `schedule` in fb-www, prepare to fix polyfill issue internally (#12900) //<Flarnie Marchan>//
- **[83f76e4db](facebook/react@83f76e4db)**: ForwardRefs supports propTypes (#12911) //<Brian Vaughn>//
- **[8aeea5afa](facebook/react@8aeea5afa)**: Do not assign node.value on input creation if no change will occur (#12925) //<Nathan Hunzaker>//
- **[aa85b0fd5](facebook/react@aa85b0fd5)**: Upgrade to Jest 23 (#12894) //<Simen Bekkhus>//
- **[61777a78f](facebook/react@61777a78f)**: [scheduler] 3/n Use a linked list instead of map and queue for callback storage (#12893) //<Flarnie Marchan>//
- **[e7bd3d59a](facebook/react@e7bd3d59a)**: No longer expose ReactNativeComponentTree (#12904) //<Sebastian Markbåge>//
- **[f35d989be](facebook/react@f35d989be)**: TestRenderer warns if flushThrough is passed the wrong params (#12909) //<Brian Vaughn>//
- **[557870067](facebook/react@557870067)**: Record "actual" times for all Fibers within a Profiler tree (alt) (#12910) //<Brian Vaughn>//
- **[76e07071a](facebook/react@76e07071a)**: [scheduler] 2/n Adding 'schedule' fixture (#12884) //<Flarnie Marchan>//
- **[345e0a71a](facebook/react@345e0a71a)**: Improve tests for 'schedule' module (#12880) //<Flarnie Marchan>//
- **[8765d6089](facebook/react@8765d6089)**: Update bundle sizes for 16.4.0 release //<Andrew Clark>//
- **[d427a563d](facebook/react@d427a563d)**: Updating package versions for release 16.4.0 //<Andrew Clark>//
- **[53852a887](facebook/react@53852a887)**: add functional components warning about legacy context api (#12892) //<Chang Yan>//
- **[fe747a51c](facebook/react@fe747a51c)**: Add React.Timeout to getComponentName (#12890) //<Toru Kobayashi>//
- **[c601f7a64](facebook/react@c601f7a64)**: add siblings Timeout components test case (#12862) //<Chang Yan>//
- **[735035837](facebook/react@735035837)**: add legacy context API warning in strict mode (#12849) //<Chang Yan>//
- **[e88579184](facebook/react@e88579184)**: Fix a regression that caused us to listen to extra events at the top (#12878) //<Dan Abramov>//
- **[7c0aca289](facebook/react@7c0aca289)**: Rollup freeze: false (#12879) //<Brian Vaughn>//
- **[33289b530](facebook/react@33289b530)**: Tests and fixes for 'timing out' behavior (#12858) //<Flarnie Marchan>//
- **[ad27845cc](facebook/react@ad27845cc)**: Fix double-firing submit events (#12877) //<Sophie Alpert>//
- **[dd5fad296](facebook/react@dd5fad296)**: Update Flow to 0.70 (#12875) //<Dan Abramov>//
- **[13003654e](facebook/react@13003654e)**: Pass "start time" and "commit time" to Profiler callback (#12852) //<Brian Vaughn>//
- **[dc3b144f4](facebook/react@dc3b144f4)**: Treat Rollup "warnings" as errors (#12868) //<Dan Abramov>//
- **[d7b9b4921](facebook/react@d7b9b4921)**: Fix react native example links in README of 'react-reconciler' (#12871) //<Kevin (Kun) "Kassimo" Qian>//
- **[9bed4a6ae](facebook/react@9bed4a6ae)**: https in reactProdInvariant text (#12869) //<Sophie Alpert>//
- **[47b003a82](facebook/react@47b003a82)**: Resolve host configs at build time (#12792) //<Dan Abramov>//

Release Notes:
[GENERAL] [FEATURE] [React] - React sync for revisions c0fe8d6...ae14317

Reviewed By: bvaughn

Differential Revision: D8458731

fbshipit-source-id: afefaa50685d43e70c8ea85c70d2e29dee311cbb
macdoum1 pushed a commit to macdoum1/react-native that referenced this issue Jun 28, 2018
Summary:
This sync includes the following changes:
- **[ae14317d6](facebook/react@ae14317d6)**: Inline fbjs/lib/emptyFunction (facebook#13054) //<Dan Abramov>//
- **[72434a768](facebook/react@72434a768)**: Remove or inline some fbjs dependencies (facebook#13046) //<Dan Abramov>//
- **[64c54edea](facebook/react@64c54edea)**: Adding movementX and movementY to synthenticMouseEvent fixes facebook#6723 (facebook#9018) //<Jason Williams>//
- **[9bd4d1fae](facebook/react@9bd4d1fae)**: Synchronously restart when an error is thrown during async rendering (facebook#13041) //<Andrew Clark>//
- **[9bda7b28f](facebook/react@9bda7b28f)**: Suspended high pri work forces lower priority work to expire early  (facebook#12965) //<Andrew Clark>//
- **[2e7577907](facebook/react@2e7577907)**: Fix incorrect data in compositionend event with Korean IME on IE11 (facebook#10217) (facebook#12563) //<Crux>//
- **[bc963f353](facebook/react@bc963f353)**: setJSResponder in Fabric renderer (facebook#13031) //<Sebastian Markbåge>//
- **[051637da6](facebook/react@051637da6)**: Extract Fabric event handlers from canonical props (facebook#13024) //<Sebastian Markbåge>//
- **[2a8085980](facebook/react@2a8085980)**: Remove rAF fork (facebook#12980) //<Flarnie Marchan>//
- **[e0c78344e](facebook/react@e0c78344e)**: Retry on error if there's lower priority pending work (facebook#12957) //<Andrew Clark>//
- **[9725065eb](facebook/react@9725065eb)**: Update bundle sizes for 16.4.1 release //<Dan Abramov>//
- **[0b87b2790](facebook/react@0b87b2790)**: Updating package versions for release 16.4.1 //<Dan Abramov>//
- **[036ae3c6e](facebook/react@036ae3c6e)**: Use native event dispatching instead of Simulate or SimulateNative (facebook#13023) //<Philipp Spieß>//
- **[945fc1bfc](facebook/react@945fc1bfc)**: Call gDSFP with the right state in react-test-render (facebook#13030) //<Rafał Ruciński>//
- **[392530104](facebook/react@392530104)**: Remove feature flag around 'getDerivedStateFromProps' bug fix (facebook#13022) //<Flarnie Marchan>//
- **[1594409fa](facebook/react@1594409fa)**: Scheduler depends on common packages (facebook#13020) //<Dan Abramov>//
- **[d5c11193e](facebook/react@d5c11193e)**: Added production profiling bundle type (facebook#12886) //<Brian Vaughn>//
- **[ec60457bc](facebook/react@ec60457bc)**: Popping context is O(1) in SSR (facebook#13019) //<Dan Abramov>//
- **[30bc8ef79](facebook/react@30bc8ef79)**: Allow multiple root children in test renderer traversal API (facebook#13017) //<Dan Abramov>//
- **[d480782c4](facebook/react@d480782c4)**: Don’t error when returning an empty Fragment (facebook#12966) //<Philipp Spieß>//
- **[4ac6f133a](facebook/react@4ac6f133a)**: Fallback to event.srcElement for IE9 (facebook#12976) //<Nathan Hunzaker>//
- **[23be4102d](facebook/react@23be4102d)**: Fixed an issue with nested contexts unwinding when server rendering. Issue facebook#12984 (facebook#12985) //<Eric Soderberg>//
- **[d0d428064](facebook/react@d0d428064)**: Remove old reference to inst._wrapperState (facebook#12987) //<Nathan Hunzaker>//
- **[c78957eac](facebook/react@c78957eac)**: Fix an SVG focusing crash in IE11 (facebook#12996) //<Jifa Jiang>//
- **[bfb12ebb5](facebook/react@bfb12ebb5)**: delete a couple of redundant lines in performWorkOnRoot() in ReactFiberScheduler.js (facebook#13003) //<Nathan Quarles>//
- **[394b17eed](facebook/react@394b17eed)**: Update custom renderer docs //<Dan Abramov>//
- **[188c4252a](facebook/react@188c4252a)**: Fix react-dom ReferenceError requestAnimationFrame in non-browser env (facebook#13000) (facebook#13001) //<Ivan Babak>//
- **[9cf3733a9](facebook/react@9cf3733a9)**: update comment in computeAsyncExpiration() to reflect code (facebook#12994) //<Nathan Quarles>//
- **[c5a733e1e](facebook/react@c5a733e1e)**: Fix links of docs on the comment (facebook#12795) //<Ende93>//
- **[36546b513](facebook/react@36546b513)**: Set the correct initial value on input range (facebook#12939) //<Maxime Nory>//
- **[15767a8f8](facebook/react@15767a8f8)**: [scheduler] 5/n Error handling in scheduler (facebook#12920) //<Flarnie Marchan>//
- **[3118ed9d6](facebook/react@3118ed9d6)**: Expose unstable_interactiveUpdates on ReactDOM (facebook#12943) //<Andrew Clark>//
- **[524a74331](facebook/react@524a74331)**: Fix for Flow issues in SimpleCacheProvider (facebook#12942) //<Flarnie Marchan>//
- **[ae57b125c](facebook/react@ae57b125c)**: [simple-cache-provider] Use LRU cache eviction (facebook#12851) //<Andrew Clark>//
- **[e0a03c1b4](facebook/react@e0a03c1b4)**: Extend input type check in selection capabilities (facebook#12062) (facebook#12135) //<Spyros Ioakeimidis>//
- **[79a740c6e](facebook/react@79a740c6e)**: Rename variables to remove references to 'global' global (facebook#12931) //<Flarnie Marchan>//
- **[ff724d3c2](facebook/react@ff724d3c2)**: [scheduler] 4/n Allow splitting out `schedule` in fb-www, prepare to fix polyfill issue internally (facebook#12900) //<Flarnie Marchan>//
- **[83f76e4db](facebook/react@83f76e4db)**: ForwardRefs supports propTypes (facebook#12911) //<Brian Vaughn>//
- **[8aeea5afa](facebook/react@8aeea5afa)**: Do not assign node.value on input creation if no change will occur (facebook#12925) //<Nathan Hunzaker>//
- **[aa85b0fd5](facebook/react@aa85b0fd5)**: Upgrade to Jest 23 (facebook#12894) //<Simen Bekkhus>//
- **[61777a78f](facebook/react@61777a78f)**: [scheduler] 3/n Use a linked list instead of map and queue for callback storage (facebook#12893) //<Flarnie Marchan>//
- **[e7bd3d59a](facebook/react@e7bd3d59a)**: No longer expose ReactNativeComponentTree (facebook#12904) //<Sebastian Markbåge>//
- **[f35d989be](facebook/react@f35d989be)**: TestRenderer warns if flushThrough is passed the wrong params (facebook#12909) //<Brian Vaughn>//
- **[557870067](facebook/react@557870067)**: Record "actual" times for all Fibers within a Profiler tree (alt) (facebook#12910) //<Brian Vaughn>//
- **[76e07071a](facebook/react@76e07071a)**: [scheduler] 2/n Adding 'schedule' fixture (facebook#12884) //<Flarnie Marchan>//
- **[345e0a71a](facebook/react@345e0a71a)**: Improve tests for 'schedule' module (facebook#12880) //<Flarnie Marchan>//
- **[8765d6089](facebook/react@8765d6089)**: Update bundle sizes for 16.4.0 release //<Andrew Clark>//
- **[d427a563d](facebook/react@d427a563d)**: Updating package versions for release 16.4.0 //<Andrew Clark>//
- **[53852a887](facebook/react@53852a887)**: add functional components warning about legacy context api (facebook#12892) //<Chang Yan>//
- **[fe747a51c](facebook/react@fe747a51c)**: Add React.Timeout to getComponentName (facebook#12890) //<Toru Kobayashi>//
- **[c601f7a64](facebook/react@c601f7a64)**: add siblings Timeout components test case (facebook#12862) //<Chang Yan>//
- **[735035837](facebook/react@735035837)**: add legacy context API warning in strict mode (facebook#12849) //<Chang Yan>//
- **[e88579184](facebook/react@e88579184)**: Fix a regression that caused us to listen to extra events at the top (facebook#12878) //<Dan Abramov>//
- **[7c0aca289](facebook/react@7c0aca289)**: Rollup freeze: false (facebook#12879) //<Brian Vaughn>//
- **[33289b530](facebook/react@33289b530)**: Tests and fixes for 'timing out' behavior (facebook#12858) //<Flarnie Marchan>//
- **[ad27845cc](facebook/react@ad27845cc)**: Fix double-firing submit events (facebook#12877) //<Sophie Alpert>//
- **[dd5fad296](facebook/react@dd5fad296)**: Update Flow to 0.70 (facebook#12875) //<Dan Abramov>//
- **[13003654e](facebook/react@13003654e)**: Pass "start time" and "commit time" to Profiler callback (facebook#12852) //<Brian Vaughn>//
- **[dc3b144f4](facebook/react@dc3b144f4)**: Treat Rollup "warnings" as errors (facebook#12868) //<Dan Abramov>//
- **[d7b9b4921](facebook/react@d7b9b4921)**: Fix react native example links in README of 'react-reconciler' (facebook#12871) //<Kevin (Kun) "Kassimo" Qian>//
- **[9bed4a6ae](facebook/react@9bed4a6ae)**: https in reactProdInvariant text (facebook#12869) //<Sophie Alpert>//
- **[47b003a82](facebook/react@47b003a82)**: Resolve host configs at build time (facebook#12792) //<Dan Abramov>//

Release Notes:
[GENERAL] [FEATURE] [React] - React sync for revisions c0fe8d6...ae14317

Reviewed By: bvaughn

Differential Revision: D8458731

fbshipit-source-id: afefaa50685d43e70c8ea85c70d2e29dee311cbb
@Udbhav12
Copy link

This problem still exists in 0.57.1

@janiokq
Copy link

janiokq commented Nov 22, 2018

If it's a performance problem caused by listview
You can try this library
react-native-nlist

@cristian-milea
Copy link

i also had this problem and i fixed the delay on TouchableOpacity inside rows with flex: 1 on FlatList. I also have only stateless components and PureComponents in row depth. The fix with flex 1 is strange but i got inspired by react-native-largelist docs.

hope it helps

<FlatList
        style={{ flex: 1 }}
...

@spruceDevelopment
Copy link

spruceDevelopment commented Apr 23, 2019

So I also had this problem for long time but then I rearchitectured my listItem template to be PureComponent and the problem disappeared. Hope it helps some other newbie like me ;)

@facebook facebook locked as resolved and limited conversation to collaborators Dec 11, 2019
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Dec 11, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Ran Commands One of our bots successfully processed a command. Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests