<commit_before>Blend.defineClass('Blend.layout.container.Fit', {
    extend: 'Blend.layout.container.Layout',
    alias: 'layout.fit',
    cssPrefix: 'fit',
    getVisibleItemIndex: function () {
        return 0;
    },
    performLayout: function () {
        var me = this;
        Blend.foreach(me.view.items, function (view, idx) {
            if (idx === me.getVisibleItemIndex()) {
                view.show();
                Blend.LayoutUtil.fit(me.containerEl, view.getElement());
            } else {
                view.hide();
            }
        });
    }
});<commit_msg>Get the visible item index only once<commit_after>Blend.defineClass('Blend.layout.container.Fit', {
    extend: 'Blend.layout.container.Layout',
    alias: 'layout.fit',
    cssPrefix: 'fit',
    getVisibleItemIndex: function () {
        return 0;
    },
    performLayout: function () {
        var me = this,
                ax = me.getVisibleItemIndex();
        Blend.foreach(me.view.items, function (view, idx) {
            if (idx === ax) {
                view.show();
                Blend.LayoutUtil.fit(me.containerEl, view.getElement());
            } else {
                view.hide();
            }
        });
    }
});
{'fraction_non_alphanumeric': 0.1437908496732026, 'fraction_numerical': 0.0016339869281045752, 'mean_word_length': 1.8096330275229358, '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': '5807168', 'n_tokens_mistral': 362, 'n_tokens_neox': 350, 'n_words': 64}