<commit_before>import Em from 'ember';
import LlamaColumn from './llama-column';
import LlamaBodyCell from './llama-body-cell';
var get = Em.get;
var set = Em.set;

var LlamaBodyColumn = LlamaColumn.extend({
	layoutName: 'llama-body-column',
	classNames: 'llama-body-column',

	controller: Em.computed.alias('parentView.parentView.parentView'),

	content: Em.computed.alias('controller.rows'),
	itemViewClass: LlamaBodyCell,

	createChildView: function (View, attrs) {
		var controller = this.get('controller');
		var column = this.get('column');
		var type = get(column, 'type');
		var Type = controller.getCellType(type);
		if (Type) {
			View = Type;
		}
		set(attrs, 'column', column);
		set(attrs, 'row', attrs.content);
		return this._super(View, attrs);
	},

	// column definition
	column: null
});

export default LlamaBodyColumn;<commit_msg>Calculate child view class of columns only once<commit_after>import Em from 'ember';
import LlamaColumn from './llama-column';
import LlamaBodyCell from './llama-body-cell';
var get = Em.get;
var set = Em.set;

var LlamaBodyColumn = LlamaColumn.extend({
	layoutName: 'llama-body-column',
	classNames: 'llama-body-column',

	controller: Em.computed.alias('parentView.parentView.parentView'),

	content: Em.computed.alias('controller.rows'),
	itemViewClass: function () {
		var controller = this.get('controller');
		var column = this.get('column');
		var type = get(column, 'type');
		return controller.getCellType(type);
	}.property(),

	createChildView: function (View, attrs) {
		var column = this.get('column');
		var row = get(attrs, 'content');
		set(attrs, 'column', column);
		set(attrs, 'row', row);
		return this._super(View, attrs);
	},

	// column definition
	column: null
});

export default LlamaBodyColumn;
{'fraction_non_alphanumeric': 0.1519774011299435, 'fraction_numerical': 0.0, 'mean_word_length': 4.903333333333333, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '1439419', 'n_tokens_mistral': 610, 'n_tokens_neox': 573, 'n_words': 145}