Skip to content

Commit d64d9b9

Browse files
bratayredbrogdon
authored andcommitted
Updated README.md file (#115)
1 parent 920be28 commit d64d9b9

1 file changed

Lines changed: 26 additions & 1 deletion

File tree

isolate_example/README.md

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,31 @@ A sample application that demonstrate best practices when using [`isolates`](htt
99
* Demonstrate how to initialize and use an isolate.
1010
* Show the cost of moving data between isolates and provide alternatives.
1111

12+
## The important bits
13+
14+
### `page_one.dart`
15+
16+
Compares running a large computation on the main isolate with running the same calculation
17+
on a second isolate. When the main isolate is used, Flutter is unable to render new frames, and
18+
the `SmoothAnimationWidget`'s animation freezes.
19+
### `page_two.dart`
20+
21+
Creates an isolate used to run an infinite loop that sums batches of 100M randomly generated
22+
numbers at a time. Users can start, terminate, pause, and resume the isolate, as well as modify
23+
how the calculation is performed.
24+
25+
### `page_three.dart`
26+
27+
Demonstrates how expensive it is to move large amounts of data between isolates and a
28+
better alternative to move data. This page creates an isolate that can add up a list of numbers
29+
and gives users three options for how to provide it with input:
30+
31+
* Send values normally using a List
32+
* Send the values using TransferableTypedData
33+
* Generate the values on the second isolate, so no copying is necessary
34+
35+
Users can then compare the performance of each approach using the displayed timestamps.
36+
1237
## Questions/issues
1338

1439
If you have a general question about any of the techniques you see in
@@ -19,4 +44,4 @@ the sample, the best places to go are:
1944
* [StackOverflow](https://stackoverflow.com/questions/tagged/flutter)
2045

2146
If you run into an issue with the sample itself, please file an issue
22-
in the [main Flutter repo](https://github.com/flutter/flutter/issues).
47+
in the [main Flutter repo](https://github.com/flutter/flutter/issues).

0 commit comments

Comments
 (0)