Repository navigation
bench(results): measure the dataset consumers; decision for #1549 - #1720
Merged
Merged
Conversation
… materialized strings; consumers keep List<List<String>> (#1549)
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Closes #1549
The issue asked to measure first.
benchmark/result_consumers_bench.dart(flutter test benchmark/result_consumers_bench.dart, headless) runs sort, filter and CSV export over a 50,000 x 20CompactResultDataset(6 int, 4 double, 10 string columns) once throughasLazyRowList()and once through aList<List<String>>built from it. Median of 5 after a warm-up, two runs:c0 > 5000Decision: keep
List<List<String>>at the consumer boundary. The lazy rows cost nothing for sort and typed filters, and 25-40 ms more for a free-text filter and the export, which run once per user action. Moving them to typed accessors would rewrite the sorter, the filter engine and the exporters for that, and the app already holds only the columnar dataset (the 68.6 -> 17.5 MiB figure of the issue is what a run keeps).Scope item 3, where the dataset is copied to strings today:
DataGridStagingBuffercopiesrows.map(List.unmodifiable), but it is built for table-browser pages and table edits, not for SQL result sets (those stay lazy).Memory is not measured by this bench (RSS in the test runner is too noisy); the issue's AOT numbers stand.