This repository was archived by the owner on Mar 24, 2026. It is now read-only.
[Dart] Update Shelf framework and add AOT variant#10853
Merged
Conversation
msmith-techempower
approved these changes
Mar 10, 2026
| ); | ||
|
|
||
| /// Responds with the JSON test to the [request]. | ||
| Response _jsonTest() => _sendJson(const {'message': 'Hello, World!'}); |
Member
There was a problem hiding this comment.
Just noting that I spent some time learning about Dart and this const bit. Seems to do the work of instantiating a new object from that constant map every request.
Contributor
Author
There was a problem hiding this comment.
@msmith-techempower
it's awesome that you are learning Dart <3
AFAIK const is calculated at compile time, so there shouldn't be any perfermance difference between
Response _jsonTest() => _sendJson(const {'message': 'Hello, World!'});and
const _message = {'message': 'Hello, World!'};
/// ...
Response _jsonTest() => _sendJson(_message);literals like Strings without runtime variables (both var and final) should be automatically compiled as const like below
Response _plaintextTest() => _sendText('Hello, World!');side note: I tried to leave most of the native implementation"untouched" and theaotversion as close as possible tonative` to keep the comparison relevant.
DavideD
pushed a commit
to DavideD/FrameworkBenchmarks
that referenced
this pull request
Mar 16, 2026
* update existing implementation * udd shelf AOT implementation * fix typo in benchmark_config.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR bumps the dependencies for the Dart shelf framework and adds an AOT variant.
Changes
benchmark_config.json.