title: Dart- Isolates are very slow when working with lists
body: <p>I want to generate a list of 300 items from a String however when this task is divided into 3 isolates,where each isolate is generating a list of 100 items it takes just as long as it would take a single isolate to generate a list of 300 items.</p>
  <p>the fetchCoinList() method below is what is being run in the isolate and the generateList() method spawns 3 isolates.</p>
  <p>All these isolates do work in parallel and do return their respective lists.</p>
  <pre><code>List&lt;CoinData&gt; fetchCoinList(ListConfig listConfig) {
    List&lt;CoinData&gt; coinList = [];
  
    for (int index = listConfig.listStart; index &lt; listConfig.listEnd; index++) {
      if (jsonDecode(listConfig.listData)['data'][index]['rank'] == null ||
          jsonDecode(listConfig.listData)['data'][index]['priceUsd'] == null ||
          jsonDecode(listConfig.listData)['data'][index]['changePercent24Hr'] ==
              null) continue;
  
      int rank =
          int.parse(jsonDecode(listConfig.listData)['data'][index]['rank']);
      String name = jsonDecode(listConfig.listData)['data'][index]['name'];
      String symbol = jsonDecode(listConfig.listData)['data'][index]['symbol'];
      String id = jsonDecode(listConfig.listData)['data'][index]['id'];
      double value = double.parse(
          jsonDecode(listConfig.listData)['data'][index]['priceUsd']);
      double percentChange = double.parse(
          jsonDecode(listConfig.listData)['data'][index]['changePercent24Hr']);
      String image =
          'https://static.coincap.io/assets/icons/${symbol.toLowerCase()}@2x.png';
      print(listConfig.listEnd);
  
      coinList.add(CoinData(rank, id, name, symbol, value, percentChange, image));
    }
    return coinList;
  }
  
  Future&lt;List&lt;CoinData&gt;&gt; generateList(String response) async {
    print(&quot;Inside isolate&quot;);
  
    List&lt;CoinData&gt; coinList = [];
    List list = [];
  
    for (int i = 0; i &lt; 3; i++) {
      ListConfig listConfig = ListConfig(response, i * 100, (i * 100) + 100);
      list.add(compute(fetchCoinList, listConfig));
    }
  
    for (int i = 0; i &lt; 3; i++) {
      coinList = coinList + await list[i];
    }
  
    return coinList;
  }
  </code></pre>
  <p>What could be a workaround for this problem? how would one go about generating a list of 300 or a 1000 items if required(without hanging the main thread)?</p>