<commit_before>import React, { Component, PropTypes } from 'react';
import { Origin } from 'redux-tooltip';
import ProfileTooltip from './ProfileTooltip';

export default class ProfileTooltipOrigin extends Component {
  static contextTypes = {
    store: PropTypes.object,
  };

  constructor(props) {
    super(props);
  }

  render() {
    return (
      <Origin
        name="userProfile"
        content={<ProfileTooltip username={this.props.username} store={this.context.store} />}
        delay
      >
        { this.props.children }
      </Origin>
    );
  }
}<commit_msg>add render condition for performance benefit<commit_after>import React, { Component, PropTypes } from 'react';
import { Origin } from 'redux-tooltip';
import ProfileTooltip from './ProfileTooltip';

export default class ProfileTooltipOrigin extends Component {
  static contextTypes = {
    store: PropTypes.object,
  };

  constructor(props) {
    super(props);
  }

  shouldComponentUpdate(nextProps) {
    return nextProps.username !== this.props.username;
  }

  render() {
    return (
      <Origin
        name="userProfile"
        content={<ProfileTooltip username={this.props.username} store={this.context.store} />}
        delay
      >
        { this.props.children }
      </Origin>
    );
  }
}
{'fraction_non_alphanumeric': 0.12015503875968993, 'fraction_numerical': 0.0, 'mean_word_length': 3.0470219435736676, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7383936', 'n_tokens_mistral': 356, 'n_tokens_neox': 361, 'n_words': 81}