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

PERF: Recover changes_applied performance #31698

Merged
merged 1 commit into from
Jan 22, 2018

Commits on Jan 21, 2018

  1. PERF: Recover changes_applied performance

    rails#30985 caused `object.save` performance regression since calling
    `changes` in `changes_applied` is very slow.
    We don't need to call the expensive method in `changes_applied` as long
    as `@attributes` is tracked by mutation tracker.
    
    https://gist.github.com/kamipo/1a9f4f3891803b914fc72ede98268aa2
    
    Before:
    
    ```
    Warming up --------------------------------------
    create_string_columns
                            73.000  i/100ms
    Calculating -------------------------------------
    create_string_columns
                            722.256  (± 5.8%) i/s -      3.650k in   5.073031s
    ```
    
    After:
    
    ```
    Warming up --------------------------------------
    create_string_columns
                            96.000  i/100ms
    Calculating -------------------------------------
    create_string_columns
                            950.224  (± 7.7%) i/s -      4.800k in   5.084837s
    ```
    kamipo committed Jan 21, 2018
    Configuration menu
    Copy the full SHA
    78b8baa View commit details
    Browse the repository at this point in the history