Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(188)

Issue 1534043002: Cache element docs (and add to completions) (#23694). (Closed)

Created:
5 years ago by pquitslund
Modified:
5 years ago
CC:
reviews_dartlang.org
Base URL:
git@github.com:dart-lang/sdk.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Cache element docs (and add to completions) [#23694]. This does away with the expensive call to `computeDocumentationComment` in favor of cached comments. Notably this makes adding doc content to code completion proposals performant (and so is done here). It should also make `dartdoc` *much* faster for doc generation since there are no more trips to disk to fetch comments for elements (still needed for source though). For more on the desire for docs in completions see here: https://github.com/dart-lang/sdk/issues/23694 R=brianwilkerson@google.com, scheglov@google.com Committed: https://github.com/dart-lang/sdk/commit/1f8eddcc2113ed5a0474520455582066a3ce6aaf

Patch Set 1 #

Total comments: 4

Patch Set 2 : review_fix #

Total comments: 6

Patch Set 3 : tweaks #

Unified diffs Side-by-side diffs Delta from patch set Stats (+236 lines, -112 lines) Patch
M pkg/analysis_server/lib/src/computer/computer_hover.dart View 3 chunks +4 lines, -46 lines 0 comments Download
M pkg/analysis_server/lib/src/services/completion/dart/suggestion_builder.dart View 2 chunks +7 lines, -0 lines 0 comments Download
A pkg/analysis_server/lib/src/utilities/documentation.dart View 1 chunk +69 lines, -0 lines 0 comments Download
M pkg/analysis_server/test/services/completion/dart/imported_reference_contributor_test.dart View 1 2 1 chunk +65 lines, -0 lines 0 comments Download
M pkg/analyzer/lib/dart/element/element.dart View 1 2 3 chunks +16 lines, -3 lines 0 comments Download
M pkg/analyzer/lib/src/context/context.dart View 1 chunk +2 lines, -16 lines 0 comments Download
M pkg/analyzer/lib/src/dart/element/element.dart View 1 6 chunks +23 lines, -9 lines 0 comments Download
M pkg/analyzer/lib/src/dart/element/member.dart View 2 chunks +4 lines, -2 lines 0 comments Download
M pkg/analyzer/lib/src/generated/element_handle.dart View 2 chunks +4 lines, -2 lines 0 comments Download
M pkg/analyzer/lib/src/generated/resolver.dart View 13 chunks +17 lines, -15 lines 0 comments Download
M pkg/analyzer/lib/src/task/dart.dart View 10 chunks +25 lines, -19 lines 0 comments Download

Messages

Total messages: 8 (2 generated)
pquitslund
5 years ago (2015-12-17 22:05:23 UTC) #2
scheglov
LGTM https://codereview.chromium.org/1534043002/diff/1/pkg/analyzer/lib/src/dart/element/element.dart File pkg/analyzer/lib/src/dart/element/element.dart (right): https://codereview.chromium.org/1534043002/diff/1/pkg/analyzer/lib/src/dart/element/element.dart#newcode1717 pkg/analyzer/lib/src/dart/element/element.dart:1717: SourceRange get docRange { Did we decide to ...
5 years ago (2015-12-17 22:10:14 UTC) #3
pquitslund
Thank you! https://codereview.chromium.org/1534043002/diff/1/pkg/analyzer/lib/src/dart/element/element.dart File pkg/analyzer/lib/src/dart/element/element.dart (right): https://codereview.chromium.org/1534043002/diff/1/pkg/analyzer/lib/src/dart/element/element.dart#newcode1717 pkg/analyzer/lib/src/dart/element/element.dart:1717: SourceRange get docRange { On 2015/12/17 22:10:14, ...
5 years ago (2015-12-17 22:12:56 UTC) #4
Brian Wilkerson
LGTM https://codereview.chromium.org/1534043002/diff/20001/pkg/analysis_server/test/services/completion/dart/imported_reference_contributor_test.dart File pkg/analysis_server/test/services/completion/dart/imported_reference_contributor_test.dart (right): https://codereview.chromium.org/1534043002/diff/20001/pkg/analysis_server/test/services/completion/dart/imported_reference_contributor_test.dart#newcode69 pkg/analysis_server/test/services/completion/dart/imported_reference_contributor_test.dart:69: test_doc_function() async { We should add a test ...
5 years ago (2015-12-17 22:51:17 UTC) #5
pquitslund
Thanks! https://codereview.chromium.org/1534043002/diff/20001/pkg/analysis_server/test/services/completion/dart/imported_reference_contributor_test.dart File pkg/analysis_server/test/services/completion/dart/imported_reference_contributor_test.dart (right): https://codereview.chromium.org/1534043002/diff/20001/pkg/analysis_server/test/services/completion/dart/imported_reference_contributor_test.dart#newcode69 pkg/analysis_server/test/services/completion/dart/imported_reference_contributor_test.dart:69: test_doc_function() async { On 2015/12/17 22:51:17, Brian Wilkerson ...
5 years ago (2015-12-18 04:56:50 UTC) #6
pquitslund
5 years ago (2015-12-18 05:07:47 UTC) #8
Message was sent while issue was closed.
Committed patchset #3 (id:40001) manually as
1f8eddcc2113ed5a0474520455582066a3ce6aaf (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698