Skip to content

expectations on large uint8 lists take forever #2553

@iinozemtsev

Description

@iinozemtsev

Looks like expect(largeUint8List, "anyting?") takes way too long.

Full repro:

import 'dart:typed_data';
import 'package:test/test.dart';

void main() {
  test('repro', () {
    final stopwatch = Stopwatch()..start();
    final list = Uint8List(100*1024*1024);
    print('List creation took ${stopwatch.elapsed}');
    stopwatch.reset();
    try {
      expect(list, null);
    } finally {
      print('expect took ${stopwatch.elapsed}');
    }
  });
}

For me the test above prints:

List creation took 0:00:00.000330
expect took 0:01:22.457127

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions