| commit | 34a21f5691160c58a593d02ed73c888059d696de | [log] [tgz] |
|---|---|---|
| author | Danny Tuppeny <danny@tuppeny.com> | Thu May 18 18:31:28 2023 +0000 |
| committer | Commit Queue <dart-scoped@luci-project-accounts.iam.gserviceaccount.com> | Thu May 18 18:31:28 2023 +0000 |
| tree | ecc6b7faaed14500408c47c7c889d79f2a3064b7 | |
| parent | 2bce12b9775661d7111c77ac6a9fcccb630cf4a6 [diff] |
[analysis_server] Switch to using FuzzyMatcher instead of RegExp for LSP workspace symbols See https://github.com/Dart-Code/Dart-Code/issues/4106#issuecomment-1552948926. In my tests on the Flutter repo, this reduces the matching from around 200ms to around 40ms. Before: (name: request, count: 1, elapsed: 0:00:00.708230, elapsedSelf: 0:00:00.000487) (name: findDeclarations, count: 1, elapsed: 0:00:00.707656, elapsedSelf: 0:00:00.002735) (name: discoverAvailableFiles, count: 1, elapsed: 0:00:00.000187, elapsedSelf: 0:00:00.000187) (name: ownKnown, count: 1, elapsed: 0:00:00.023311, elapsedSelf: 0:00:00.023311) (name: findDeclarations, count: 1, elapsed: 0:00:00.681423, elapsedSelf: 0:00:00.016362) (name: getLibraryByUri, count: 7276, elapsed: 0:00:00.295596, elapsedSelf: 0:00:00.295596) (name: finder, count: 7272, elapsed: 0:00:00.369465, elapsedSelf: 0:00:00.055566) (name: addDeclaration, count: 317711, elapsed: 0:00:00.313899, elapsedSelf: 0:00:00.080608) (name: doNothing, count: 317711, elapsed: 0:00:00.020405, elapsedSelf: 0:00:00.020405) (name: regExp, count: 317711, elapsed: 0:00:00.212886, elapsedSelf: 0:00:00.212886) (name: convert, count: 1, elapsed: 0:00:00.000087, elapsedSelf: 0:00:00.000087)(declarations: 1) After: (name: request, count: 1, elapsed: 0:00:00.522033, elapsedSelf: 0:00:00.003331) (name: findDeclarations, count: 1, elapsed: 0:00:00.518648, elapsedSelf: 0:00:00.002939) (name: discoverAvailableFiles, count: 1, elapsed: 0:00:00.000213, elapsedSelf: 0:00:00.000213) (name: ownKnown, count: 1, elapsed: 0:00:00.021037, elapsedSelf: 0:00:00.021037) (name: findDeclarations, count: 1, elapsed: 0:00:00.494459, elapsedSelf: 0:00:00.016197) (name: getLibraryByUri, count: 7276, elapsed: 0:00:00.292021, elapsedSelf: 0:00:00.292021) (name: finder, count: 7272, elapsed: 0:00:00.186241, elapsedSelf: 0:00:00.050400) (name: addDeclaration, count: 317711, elapsed: 0:00:00.135841, elapsedSelf: 0:00:00.072235) (name: doNothing, count: 317711, elapsed: 0:00:00.019244, elapsedSelf: 0:00:00.019244) (name: isMatch, count: 317711, elapsed: 0:00:00.044362, elapsedSelf: 0:00:00.044362) (name: convert, count: 1, elapsed: 0:00:00.000054, elapsedSelf: 0:00:00.000054)(declarations: 1) Change-Id: Ib8775536fb7b16b9d29c2839167ce41de9ecc874 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/304341 Reviewed-by: Konstantin Shcheglov <scheglov@google.com> Commit-Queue: Konstantin Shcheglov <scheglov@google.com> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Dart is:
Optimized for UI: Develop with a programming language specialized around the needs of user interface creation.
Productive: Make changes iteratively: use hot reload to see the result instantly in your running app.
Fast on all platforms: Compile to ARM & x64 machine code for mobile, desktop, and backend. Or compile to JavaScript for the web.
Dart's flexible compiler technology lets you run Dart code in different ways, depending on your target platform and goals:
Dart Native: For programs targeting devices (mobile, desktop, server, and more), Dart Native includes both a Dart VM with JIT (just-in-time) compilation and an AOT (ahead-of-time) compiler for producing machine code.
Dart Web: For programs targeting the web, Dart Web includes both a development time compiler (dartdevc) and a production time compiler (dart2js).
Dart is free and open source.
See LICENSE and PATENT_GRANT.
Visit dart.dev to learn more about the language, tools, and to find codelabs.
Browse pub.dev for more packages and libraries contributed by the community and the Dart team.
Our API reference documentation is published at api.dart.dev, based on the stable release. (We also publish docs from our beta and dev channels, as well as from the primary development branch).
If you want to build Dart yourself, here is a guide to getting the source, preparing your machine to build the SDK, and building.
There are more documents on our wiki.
The easiest way to contribute to Dart is to file issues.
You can also contribute patches, as described in Contributing.