Closed RWOverdijk closed 5 years ago
When using renderImage CPU goes insane. Upon further inspection I found that renderImage gets called more than 100 times per notification. It gets so bad that all my other animations halt for 2 seconds.
renderImage
Just use the plugin. Snippet:
<DropdownAlert renderImage={(props, message) => { return ( <CircleIcon containerStyle={props.imageStyle} icon={'check'} /> ); }} infoColor={Colors.Info} warnColor={Colors.Warn} errorColor={Colors.Error} successColor={Colors.Success} onClose={environment.notification.onClose} ref={(ref: DropdownAlert) => environment.notification.setDropdown(ref)} useNativeDriver />
Note: useNativeDriver makes no difference in performance.
Not calling thee callbacks more than a hundred times.
Hi @RWOverdijk, please retest on 4.0.0.
4.0.0
I'm not using this anymore. Feel free to close it.
Short Description
When using
renderImage
CPU goes insane. Upon further inspection I found that renderImage gets called more than 100 times per notification. It gets so bad that all my other animations halt for 2 seconds.Steps to Reproduce / Code Snippets / Usage
Just use the plugin. Snippet:
Note: useNativeDriver makes no difference in performance.
Expected Results
Not calling thee callbacks more than a hundred times.
Additional Information