Skip to content

Commit 26e0ed6

Browse files
author
Vahid
committed
Evaluate FB asciiOptimization: Remove TODOs in code_chunks.dart #360
Replaced TODOs with updated notes regarding benchmark and Flutter/Dart versions used
1 parent 73bd135 commit 26e0ed6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

generator/lib/src/code_chunks.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -349,13 +349,13 @@ class CodeChunks {
349349
fbReader = 'fb.${_propertyFlatBuffersType[p.type]}Reader()';
350350
return readFieldNonNull('0');
351351
case OBXPropertyType.String:
352-
// TODO `asciiOptimization: true` is for keeping the same behavior as the previous FB fork.
353-
// Check if it still makes sense with the latest Dart/Flutter.
352+
// still makes sense to keep `asciiOptimization: true`
353+
// `readAll` faster(6.1ms) than when false(8.1ms) on Flutter 3.0.1, Dart 2.17.1
354354
fbReader = 'fb.StringReader(asciiOptimization: true)';
355355
break;
356356
case OBXPropertyType.StringVector:
357-
// TODO `asciiOptimization: true` is for keeping the same behavior as the previous FB fork.
358-
// Check if it still makes sense with the latest Dart/Flutter.
357+
// still makes sense to keep `asciiOptimization: true`
358+
// `readAll` faster(6.1ms) than when false(8.1ms) on Flutter 3.0.1, Dart 2.17.1
359359
fbReader =
360360
'fb.ListReader<String>(fb.StringReader(asciiOptimization: true), lazy: false)';
361361
break;

0 commit comments

Comments
 (0)