Results 1 to 2 of 2

Thread: Inefficient bug fix in ExtJS

  1. #1
    Sencha User
    Join Date
    Jul 2015
    Posts
    11

    Default Inefficient bug fix in ExtJS

    Hi,

    In Auto.js there seems to be this fix for a Chrome issue which causes multiple unnecessary reflows when the layout is flushed. The code is in measureContentWidth():
    Code:
            if (this.chromeCellMeasureBug) {
                dom = this.innerCt.dom;
                style = dom.style;
                old = style.display;
                
                if (old == 'table-cell') {
                    style.display = '';
                    dom.offsetWidth;
                    style.display = old;
                }    
            }
    The problem with this code is it makes changes to the DOM and then immediately reads a value from the style, which will force the browser to reflow instead of batching changes.
    More on this here. It's also called multiple times during a flushLayouts (once per component?) which is what makes it expensive.
    I've checked and this fix is also in ExtJS 6.0.1. What exactly is it trying to fix? Perhaps the Chrome bug has since been resolved? Is it safe to remove this fix or is there a different workaround?

    Thanks in advance,

    Danny

  2. #2
    Sencha User
    Join Date
    Feb 2013
    Location
    California
    Posts
    11,985

    Default

    Are you able to recreate this issue in a test case?
    https://fiddle.sencha.com/#home

Similar Threads

  1. [FIXED] Super inefficient datepickerfield destroy method
    By Di Peng in forum Sencha Touch 2.x: Bugs
    Replies: 5
    Last Post: 23 Mar 2012, 12:41 PM
  2. Extremely inefficient update of SVG text sprites
    By stahlman in forum Ext: Q&A
    Replies: 0
    Last Post: 4 Oct 2011, 12:17 PM
  3. [CLOSED]BasicForm - isValid is inefficient
    By wongpat in forum Ext 3.x: Bugs
    Replies: 3
    Last Post: 5 Nov 2010, 12:30 PM
  4. [FIXED-251][3.x] _getCacheIndex really inefficient
    By Condor in forum Ext 3.x: Bugs
    Replies: 14
    Last Post: 17 Sep 2009, 12:50 AM
  5. [FIXED][3.0.0] validationEvent:'blur' is inefficient
    By Condor in forum Ext 3.x: Bugs
    Replies: 2
    Last Post: 20 Jul 2009, 1:45 AM

Tags for this Thread

Posting Permissions

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