Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[draft] Benchmark linked list v11 impl #4256

Draft
wants to merge 72 commits into
base: v11-benchmark-base
Choose a base branch
from

Commits on Dec 21, 2022

  1. Configuration menu
    Copy the full SHA
    9e341b6 View commit details
    Browse the repository at this point in the history

Commits on Jan 2, 2023

  1. Implement basic patchChildren using linked list and skewed old head.

    - Removed vnode arg to mount
    - Fixed up mounting with linked list
    - Use _index property on internal to track null holes in children
    
    Co-authored-by: Jovi De Croock <[email protected]>
    Co-authored-by: Jason Miller <[email protected]>
    Co-authored-by: Marvin Hagemeister <[email protected]>
    4 people committed Jan 2, 2023
    Configuration menu
    Copy the full SHA
    dda7076 View commit details
    Browse the repository at this point in the history
  2. WIP: Switch insertion loop to loop backwards through internal children

    After running into problems with the 'should move multiple keyed children to the beginning' test with the previous commit, we are switching our insertion loop to iterate backwards through the internal children to do insertions.
    
    In summary:
    First loop:
    - find matching internals (using if _prev pointer is set to determine if an internal has been used)
    - setup _prev pointers to be correct
    
    Second loop:
    - setup _next pointers to be correct
    - insert or mount dom children (detect if a node was moved by comparing if internal._prev._next == internal)
    
    There are still bugs though but above is the general idea we are going for
    
    Co-authored-by: Jason Miller <[email protected]>
    Co-authored-by: Marvin Hagemeister <[email protected]>
    3 people committed Jan 2, 2023
    Configuration menu
    Copy the full SHA
    5e6cb22 View commit details
    Browse the repository at this point in the history

Commits on Jan 3, 2023

  1. WIP: Unmount before inserting and fix up insertion loop

    Unmount before inserting means we can use _prev == null to detect internals that need to be unmounted and removes unmounted nodes from the internal children linked list when doing inserts (so all _prev and _next pointers point to internals that will be included)
    
    Use `.data` to detect if a component has been mounted or not.
    
    Fix up next pointers when mounting or moving internals
    
    Co-authored-by: Jason Miller <[email protected]>
    andrewiggins and developit committed Jan 3, 2023
    Configuration menu
    Copy the full SHA
    27d57d0 View commit details
    Browse the repository at this point in the history

Commits on Jan 19, 2023

  1. Add two more keys test

    andrewiggins committed Jan 19, 2023
    Configuration menu
    Copy the full SHA
    31a9967 View commit details
    Browse the repository at this point in the history
  2. Simplify keys test and focus on only test we currently care about

    - Comment out and skip tests we want to currently ignore
    - Just focus on number of ops for reverse list atm
    andrewiggins committed Jan 19, 2023
    Configuration menu
    Copy the full SHA
    8d138c9 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    02e9046 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    07b9f1b View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    aa884e2 View commit details
    Browse the repository at this point in the history
  6. Use a modified LIS algorithm to determine which internals to move

    Here I'm using a variant of the longest increasing subsequence algorithm to determine which nodes to move. There are two key differences in my algorithm:
    
    1. I am looping over the nodes in reverse order, so my algorithm is actually a longest decreasing subsequence (LDS) instead of longest increasing subsequence (LIS).
    
    2. I don't use a binary search to insert new nodes into the "wip" LDS array.
    andrewiggins committed Jan 19, 2023
    Configuration menu
    Copy the full SHA
    e80c37a View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    c707247 View commit details
    Browse the repository at this point in the history

Commits on Jan 20, 2023

  1. Configuration menu
    Copy the full SHA
    e04e7e7 View commit details
    Browse the repository at this point in the history

Commits on Jan 21, 2023

  1. Configuration menu
    Copy the full SHA
    ffb7d52 View commit details
    Browse the repository at this point in the history

Commits on Jan 22, 2023

  1. Configuration menu
    Copy the full SHA
    91c8247 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    133d09a View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    b0484d0 View commit details
    Browse the repository at this point in the history
  4. Fix unmounting

    andrewiggins committed Jan 22, 2023
    Configuration menu
    Copy the full SHA
    14a23f6 View commit details
    Browse the repository at this point in the history

Commits on Jan 23, 2023

  1. Configuration menu
    Copy the full SHA
    1337b1d View commit details
    Browse the repository at this point in the history

Commits on Jan 26, 2023

  1. WIP: progress on doc

    andrewiggins committed Jan 26, 2023
    Configuration menu
    Copy the full SHA
    fce7ce4 View commit details
    Browse the repository at this point in the history

Commits on Jan 28, 2023

  1. Configuration menu
    Copy the full SHA
    d6bc741 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    bc4bc4c View commit details
    Browse the repository at this point in the history

Commits on Jan 29, 2023

  1. Configuration menu
    Copy the full SHA
    4bd061b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    7fd9f59 View commit details
    Browse the repository at this point in the history

Commits on Jan 30, 2023

  1. Configuration menu
    Copy the full SHA
    d759b08 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    682399b View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    0576c45 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    a43e559 View commit details
    Browse the repository at this point in the history
  5. Fix forwardRef

    andrewiggins committed Jan 30, 2023
    Configuration menu
    Copy the full SHA
    4ee0483 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    f9aaf2c View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    6ccd7e9 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    1e3f694 View commit details
    Browse the repository at this point in the history

Commits on Jan 31, 2023

  1. Configuration menu
    Copy the full SHA
    560d403 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    9fe14d7 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    1e22b22 View commit details
    Browse the repository at this point in the history
  4. Fix forward ref, pt. 2

    andrewiggins committed Jan 31, 2023
    Configuration menu
    Copy the full SHA
    5db19bd View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    6e6a5d6 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    e3a5320 View commit details
    Browse the repository at this point in the history

Commits on Feb 1, 2023

  1. Fix suspended hydration

    When we are rendering after a hydration that suspended, we need to detect the node that suspended while hydrating and send through the mount code path so it can resume hydration if on this rerender it can resume. Doing this also ensures the suspended hydration flags and state are preserved so additional rerenders have the same behavior.
    andrewiggins committed Feb 1, 2023
    Configuration menu
    Copy the full SHA
    6db4fb6 View commit details
    Browse the repository at this point in the history

Commits on Feb 3, 2023

  1. Configuration menu
    Copy the full SHA
    0a0fa83 View commit details
    Browse the repository at this point in the history
  2. Remove internal check around LDS loop

    Instead, check the length of the wipLDS array in the loop body. This change allows us to use the LDS loop to detect portals at the start of the child internal list
    andrewiggins committed Feb 3, 2023
    Configuration menu
    Copy the full SHA
    0d60437 View commit details
    Browse the repository at this point in the history

Commits on Feb 6, 2023

  1. Configuration menu
    Copy the full SHA
    13ade35 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    1970840 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    ef7a9b6 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    a5c25c3 View commit details
    Browse the repository at this point in the history
  5. === BEGIN v11-linked-list-prev-index-nextDom === Use flags to track m…

    …atched vs unmatched internals
    andrewiggins committed Feb 6, 2023
    Configuration menu
    Copy the full SHA
    b3d8fe7 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    9f7db6d View commit details
    Browse the repository at this point in the history

Commits on Feb 7, 2023

  1. WIP: Walk loop forwards and pass along the boundary dom node in patch…

    … recursion
    
    I focused on the keys, render, fragments, and placholder tests for this commit
    andrewiggins committed Feb 7, 2023
    Configuration menu
    Copy the full SHA
    0354b3d View commit details
    Browse the repository at this point in the history
  2. Fix null placeholder tracking

    See test "should support moving Fragments between beginning and end" for an example failure this change fixes
    andrewiggins committed Feb 7, 2023
    Configuration menu
    Copy the full SHA
    6be6e89 View commit details
    Browse the repository at this point in the history
  3. Fix Portal placement

    See test "should insert a portal before new siblings when changing container to match siblings"
    andrewiggins committed Feb 7, 2023
    Configuration menu
    Copy the full SHA
    1b940e6 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    cf64778 View commit details
    Browse the repository at this point in the history
  5. Clean up patchChildren implementation

    * Remove usages of MODE_UNMOUNTING & MATCHED_INTERNAL
    * Clean up and improve comments
    andrewiggins committed Feb 7, 2023
    Configuration menu
    Copy the full SHA
    c251d82 View commit details
    Browse the repository at this point in the history
  6. Remove _prev and rename _prevLIS to _tempNext...

    ... since we are reusing it for different purposes in the diff algorithm
    andrewiggins committed Feb 7, 2023
    Configuration menu
    Copy the full SHA
    0e3c34c View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    994b6e3 View commit details
    Browse the repository at this point in the history
  8. Skip LIS when nothing moves

    To fix this I had to teach getDomSibling to skip over nodes marked for insertion, as well as properly handle nodes with no children. See the fragment test "should preserve state when it does not change positions" for a test case that was fixed.
    
    Note: This breaks a Portal test when changing a portal from having a different parent to the same parent. Probably need to detect that and set the moved flag to true. Maybe we could detect it in findMatches and set the move flag as well as a PORTAL flag on the internal to speed up similar checks
    andrewiggins committed Feb 7, 2023
    Configuration menu
    Copy the full SHA
    b65e1b6 View commit details
    Browse the repository at this point in the history
  9. Remove usage of boundary node parameter

    Speeds up benchmark perf on many_updates
    andrewiggins committed Feb 7, 2023
    Configuration menu
    Copy the full SHA
    fba2129 View commit details
    Browse the repository at this point in the history

Commits on Feb 12, 2023

  1. Use Internal class

    andrewiggins committed Feb 12, 2023
    Configuration menu
    Copy the full SHA
    5c955a1 View commit details
    Browse the repository at this point in the history

Commits on Feb 13, 2023

  1. Configuration menu
    Copy the full SHA
    61985ec View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    72550c4 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    869a20b View commit details
    Browse the repository at this point in the history
  4. Remove LIS algo

    andrewiggins committed Feb 13, 2023
    Configuration menu
    Copy the full SHA
    5de56b0 View commit details
    Browse the repository at this point in the history

Commits on Feb 17, 2023

  1. Configuration menu
    Copy the full SHA
    4e9b5e5 View commit details
    Browse the repository at this point in the history
  2. Inline insertionLoop into patchChildren

    Reduces recursion level by 1 function
    andrewiggins committed Feb 17, 2023
    Configuration menu
    Copy the full SHA
    a9f0d59 View commit details
    Browse the repository at this point in the history
  3. Remove _tempNext pointer

    andrewiggins committed Feb 17, 2023
    Configuration menu
    Copy the full SHA
    51053fb View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    38bc3f6 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    a5310ad View commit details
    Browse the repository at this point in the history

Commits on Feb 18, 2023

  1. Move building the key map into its own function to save some bytes

    I think this saves bytes cuz the implementation is another "loop over internals" and putting it into its own function gives the core internal variable the same minified name as other functions that also loop over internals.
    andrewiggins committed Feb 18, 2023
    Configuration menu
    Copy the full SHA
    d00f85c View commit details
    Browse the repository at this point in the history
  2. Fix dom operation tests

    Lots of tests changed cuz we unmount before doing insertions now
    andrewiggins committed Feb 18, 2023
    Configuration menu
    Copy the full SHA
    9e7cac2 View commit details
    Browse the repository at this point in the history
  3. Skip over internals that haven't been mounted yet when searching for …

    …DOM nodes
    
    Fixes the portal test "should insert a portal before new siblings when changing container to match siblings"
    andrewiggins committed Feb 18, 2023
    Configuration menu
    Copy the full SHA
    2b042c0 View commit details
    Browse the repository at this point in the history

Commits on Mar 6, 2023

  1. Configuration menu
    Copy the full SHA
    ef08d9b View commit details
    Browse the repository at this point in the history

Commits on Mar 7, 2023

  1. Configuration menu
    Copy the full SHA
    77cb172 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    1e505c5 View commit details
    Browse the repository at this point in the history

Commits on Jan 16, 2024

  1. Configuration menu
    Copy the full SHA
    ccbaf42 View commit details
    Browse the repository at this point in the history