Results 1 to 5 of 5

Thread: 6.5.3.36 classic nightly regression - Too Many Row Widgets

    Success! Looks like we've fixed this one. According to our records the fix was applied for EXTJS-26678 in 6.5.3.
  1. #1
    Sencha Premium User evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    19,257

    Default 6.5.3.36 classic nightly regression - Too Many Row Widgets

    Test case:

    Code:
    Ext.define('Foo', {
        extend: 'Ext.Component',
        xtype: 'foo',
    
        initComponent() {
            console.log('foo', Ext.ComponentQuery.query('foo').length);
            this.callParent();
        }
    });
    
    Ext.define('Bar', {
        extend: 'Ext.Component',
        xtype: 'bar',
    
        initComponent() {
            console.log('bar', Ext.ComponentQuery.query('bar').length);
            this.callParent();
        }
    });
    
    Ext.onReady(function() {
    
        function makeView(withStores) {
            var rowVm = withStores ? {
                formulas: {
                    sum: function(get) {
                        return get('rowStore').sum('total');
                    }
                },
                stores: {
                    rowStore: {
                        source: '{theSource}',
                        filters: [{
                            property: 'key',
                            value: '{record.key}'
                        }]
                    }
                }
            } : null;
    
            var columns = withStores ? [{
                    xtype: 'widgetcolumn',
                    widget: {
                        xtype: 'foo',
                        bind: '{sum}'
                    }
                }] : [{
                    xtype: 'widgetcolumn',
                    widget: {
                        xtype: 'bar',
                        bind: '{record.id}'
                    }
                }];
    
            new Ext.grid.Panel({
                renderTo: document.body,
                width: 400,
                height: 400,
                viewModel: {
                    stores: {
                        theSource: {
                            data: (function() {
                                var data = [],
                                    i;
    
                                for (i = 0; i < 20; ++i) {
                                    data.push({
                                        key: i % 5,
                                        total: i * 3
                                    });
                                }
                                return data;
                            })()
                        }
                    }
                },
                store: {
                    data: (function() {
                        var data = [],
                            i;
                        for (i = 1; i <= 1000; ++i) {
                            data.push({
                                id: i,
                                name: 'Item' + i,
                                key: i % 5
                            });
                        }
                        return data;
                    })()
                },
                rowViewModel: rowVm,
                columns: columns
            });
        }
        makeView(true);
    });
    Steps to reproduce:
    a) Scroll the grid from the top to bottom.
    b) Repeat a number of times.
    c) See the instance of 'foo' grow over time and scrolling becomes sluggish.

    Repeat the same steps with makeView(false). Note that the bar instances are capped at 101.

    The latest change to RowContext attempts to creates a widget per row if the viewmodel has stores (why?). It's antithetical to the design of the row context. A row context is supposed to be mapped to a row, not a record. The widget is transient and should be shared as records come and go.

    This is a bad change and needs to be rolled back.
    Twitter - @evantrimboli
    Former Sencha framework engineer, available for consulting.
    As of 2017-09-22 I am not employed by Sencha, all subsequent posts are my own and do not represent Sencha in any way.

  2. #2
    Sencha - Sustaining Engineer tristan.lee's Avatar
    Join Date
    Mar 2015
    Location
    Central Ohio
    Posts
    1,579

    Default

    Thanks for the report! I have opened a bug in our bug tracker.

  3. #3
    Ext JS Premium Member
    Join Date
    Nov 2008
    Posts
    374

    Default

    it seems that the new developers are going to touch pieces of code without knowing what they are doing.
    This is my impression.

    @Evans
    Thank you for this your work. I hope that what you are doing is recognized to you in some way.

  4. #4

    Default

    @Evans I hope you will not be discouraged from further submissions by comments saying "you are doing the work for free". yes, "new developers are going to touch code without knowing what they are doing", so instead of setting up ExtJS to fail as spite, lets work to make best of what we can. We are seeing a market correction of elevated prices for software developers. Does not mean we have to shoot our feet off by incentivising replacement developers to destroy productive framework.
    ZF tutorials and forum on alex-tech-adventures.com

  5. #5
    Sencha Premium User evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    19,257

    Default

    I'm only reporting the problems that I run across that are affecting me directly.

    lets work to make best of what we can.
    I was doing that before, when Sencha was paying me to do so. I don't have the incentive/time to do that anymore.
    Twitter - @evantrimboli
    Former Sencha framework engineer, available for consulting.
    As of 2017-09-22 I am not employed by Sencha, all subsequent posts are my own and do not represent Sencha in any way.

Similar Threads

  1. Replies: 1
    Last Post: 6 Dec 2017, 9:22 AM
  2. Replies: 1
    Last Post: 5 Dec 2017, 9:54 PM
  3. [OPEN] 6.5.3 nightly regression - Combo doc changes incorrect
    By evant in forum Ext JS 6.x Bugs
    Replies: 1
    Last Post: 5 Dec 2017, 9:51 PM
  4. Replies: 3
    Last Post: 28 Jan 2015, 10:34 PM
  5. [FIXED] regression checkboxmodel not clickable with latest nightly build
    By SebTardif in forum Ext 5: Bugs
    Replies: 1
    Last Post: 24 Nov 2014, 8:43 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •