[Webkit-unassigned] [Bug 123995] New: [CSS Grid Layout] Cache several vectors to avoid malloc/free churn

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Nov 7 08:12:01 PST 2013


https://bugs.webkit.org/show_bug.cgi?id=123995

           Summary: [CSS Grid Layout] Cache several vectors to avoid
                    malloc/free churn
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Unspecified
        OS/Version: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: CSS
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: svillar at igalia.com
            Blocks: 123994


We should probably merge:

    Cache several vectors to avoid malloc/free churn

    distributeSpaceToTracks and
    resolveContentBasedTrackSizingFunctionsForItems are both
    called in a loop during layout and resulted in a lot of
    mallocs / frees calls. This change just keeps their Vectors
    around until the end of Layout, keeping the memory around.

    This is a classic runtime vs memory trade-off as we will hold
    onto the biggest allocation until the end of layout, which
    should be fine as we *have* to allocate that amount.

    This code refactors the often passed-in arguments & the cached
    Vectors into a new data structure GridSizingData. This makes
    the code cleaner while making it difficult to forget free'ing
    the memory at the end of layout.

    This is a 40% improvement on auto-grid-lots-of-data.html.

    BUG=273238

    Review URL: https://chromiumcodereview.appspot.com/24331003

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list