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

[Skylark] Avoid unnecessary copyOf invocations. #5699

Closed
wants to merge 5 commits into from

Commits on Jul 30, 2018

  1. [Skylark] Use POJOs instead of dynamic proxies.

    Java uses dynamically generated proxy classes to access annotation properties
    and their methods are ~7X slower than plain getters. According to async-profiler
    50%+ of `convertArgumentList` method time is spent in dynamic proxy methods, so
    optimizing their performance makes sense.
    
    This also makes the model less anemic, since POJOs can actually provide business
    methods.
    ttsugriy committed Jul 30, 2018
    Configuration menu
    Copy the full SHA
    638ab84 View commit details
    Browse the repository at this point in the history
  2. [Skylark] Size argument list builder to avoid allocations.

    This change is focused on 2 things:
    - avoid creating builders in case they don't end up being used
    - create builders using the maximum expected size to avoid intermediate
      allocations to accomodate more elements
    ttsugriy committed Jul 30, 2018
    Configuration menu
    Copy the full SHA
    614debf View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    8d063f3 View commit details
    Browse the repository at this point in the history
  4. [Skylark] Use POJOs instead of dynamic proxies.

    Java uses dynamically generated proxy classes to access annotation properties
    and their methods are ~7X slower than plain getters. According to async-profiler
    50%+ of `convertArgumentList` method time is spent in dynamic proxy methods, so
    optimizing their performance makes sense.
    
    This also makes the model less anemic, since POJOs can actually provide business
    methods.
    ttsugriy committed Jul 30, 2018
    Configuration menu
    Copy the full SHA
    c14084f View commit details
    Browse the repository at this point in the history
  5. [Skylark] Avoid unnecessary copyOf invocations.

    According to async-profiler, about 50% of `Tuple.getSlice` method
    invocation is spent in `ImmutableList.copyOf` which is completely
    unnecessary for cases when an `ImmutableList` instance is passed.
    ttsugriy committed Jul 30, 2018
    Configuration menu
    Copy the full SHA
    51fdf73 View commit details
    Browse the repository at this point in the history