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

Issue 414273002: New 'use similar' fixes. (Closed)

Created:
6 years, 5 months ago by scheglov
Modified:
6 years, 5 months ago
Reviewers:
Paul Berry
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Patch Set 1 #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+353 lines, -93 lines) Patch
M pkg/analysis_services/lib/search/hierarchy.dart View 1 chunk +18 lines, -0 lines 0 comments Download
M pkg/analysis_services/lib/src/correction/fix.dart View 7 chunks +128 lines, -93 lines 3 comments Download
A pkg/analysis_services/lib/src/correction/levenshtein.dart View 1 chunk +46 lines, -0 lines 0 comments Download
M pkg/analysis_services/test/correction/fix_test.dart View 2 chunks +128 lines, -0 lines 0 comments Download
A pkg/analysis_services/test/correction/levenshtein_test.dart View 1 chunk +31 lines, -0 lines 0 comments Download
M pkg/analysis_services/test/correction/test_all.dart View 2 chunks +2 lines, -0 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
scheglov
6 years, 5 months ago (2014-07-25 17:33:40 UTC) #1
Paul Berry
lgtm https://codereview.chromium.org/414273002/diff/1/pkg/analysis_services/lib/src/correction/fix.dart File pkg/analysis_services/lib/src/correction/fix.dart (right): https://codereview.chromium.org/414273002/diff/1/pkg/analysis_services/lib/src/correction/fix.dart#newcode1104 pkg/analysis_services/lib/src/correction/fix.dart:1104: void _addFix_undefinedFunction_useSimilar() { Any way we could share ...
6 years, 5 months ago (2014-07-25 18:10:37 UTC) #2
scheglov
Committed patchset #1 manually as r38580 (presubmit successful).
6 years, 5 months ago (2014-07-25 18:17:43 UTC) #3
scheglov
6 years, 5 months ago (2014-07-25 18:53:29 UTC) #4
Message was sent while issue was closed.
https://codereview.chromium.org/414273002/diff/1/pkg/analysis_services/lib/sr...
File pkg/analysis_services/lib/src/correction/fix.dart (right):

https://codereview.chromium.org/414273002/diff/1/pkg/analysis_services/lib/sr...
pkg/analysis_services/lib/src/correction/fix.dart:1932: int memberDistance =
getLevenshteinDistance(element.name, _targetName);
On 2014/07/25 18:10:36, Paul Berry wrote:
> Levenshtein distance is O(n*m) to compute in the worst case.  Would it be
worth
> making either of the following optimizations?
> 
> 1. Pass _distance into getLevenshteinDistance().  If it determines that the
edit
> distance would be greater than _distance, it can bail out early.
> 
> 2. Since the users of this class will reject any elements whose distance >= 5,
> initialize _distance to 5 (or to a value supplied by the caller); that way we
> don't waste time computing edit distances for strings that we would never
> possibly use.  (Note: only useful if we also do 1).

https://codereview.chromium.org/417263003

Powered by Google App Engine
This is Rietveld 408576698