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

MOE Sync 2019-12-24 #1704

Merged
merged 3 commits into from
Dec 26, 2019
Merged

MOE Sync 2019-12-24 #1704

merged 3 commits into from
Dec 26, 2019

Conversation

cpovirk
Copy link
Member

@cpovirk cpovirk commented Dec 24, 2019

This code has been reviewed and submitted internally. Feel free to discuss on
the PR, and we can submit follow-up changes as necessary.

Commits:

Refactor RequestKinds.extractKeyType(RequestKind, TypeMirror) to RequestKinds.extractKeyType(TypeMirror)

RequestKinds.extractKeyType(RequestKind, TypeMirror) currently requires passing in the "correct" RequestKind for the given TypeMirror. This CL refactors the method so that the RequestKind is no longer needed because it's calculated internally. This makes the method easier to use, and we no longer have to check that the user passed in a valid RequestKind.

RELNOTES=N/A

5d863f0


Remove static RequestKinds cache and improve build performance.

See #1645

The static RequestKinds cache causes a memory leak in gradle due to the persistent GradleDaemon. This CL removes that cache entirely, and instead fixes the root causes of the performance issues, by short circuiting InjectionSiteVisitor to abort early if the method is not injectable. This avoids a lot of unnecessary calls to RequestKinds.getRequestKind() for methods that are not injectable (e.g. aren't annotated with @Inject).

The aggregated pprof results from 10 runs before and after changes in this CL are below.

                                        Before (s)    After (s)     Diff

ComponentProcessingStep.process 51.80 43.25 -16.5%
RequestKinds.getRequestKind 8.48 0.33 -95.9%

RELNOTES=Fix memory leak with RequestKinds cache.

72a2b37


Add a flag -Adagger.experimentalDaggerErrorMessages for controlling the new error messages.

Also add a CompositeBindingGraphPlugin for combining error messages so that root components are only reported once.

d7f8294

bcorso and others added 3 commits December 24, 2019 10:36
…estKinds.extractKeyType(TypeMirror)

RequestKinds.extractKeyType(RequestKind, TypeMirror) currently requires passing in the "correct" RequestKind for the given TypeMirror. This CL refactors the method so that the RequestKind is no longer needed because it's calculated internally. This makes the method easier to use, and we no longer have to check that the user passed in a valid RequestKind.

RELNOTES=N/A

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=286925810
See #1645

The static RequestKinds cache causes a memory leak in gradle due to the persistent GradleDaemon. This CL removes that cache entirely, and instead fixes the root causes of the performance issues, by short circuiting InjectionSiteVisitor to abort early if the method is not injectable. This avoids a lot of unnecessary calls to RequestKinds.getRequestKind() for methods that are not injectable (e.g. aren't annotated with @Inject).

The aggregated pprof results from 10 runs before and after changes in this CL are below.

                                            Before (s)    After (s)     Diff
-----------------------------------------------------------------------------
ComponentProcessingStep.process               51.80         43.25      -16.5%
RequestKinds.getRequestKind                    8.48          0.33      -95.9%
-----------------------------------------------------------------------------

RELNOTES=Fix memory leak with RequestKinds cache.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=286934462
…he new error messages.

Also add a CompositeBindingGraphPlugin for combining error messages so that root components are only reported once.

RELNOTES=n/a

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=286949915
@cpovirk cpovirk merged commit 0d2505a into master Dec 26, 2019
@cpovirk cpovirk deleted the sync-master-2019/12/24 branch December 26, 2019 03:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants