Slow len function on dask distributed dataframe : <p>I have been testing how to use dask (cluster with 20 cores) and I am surprised by the speed that I get on calling a len function vs slicing through loc.</p>

<pre><code>import dask.dataframe as dd
from dask.distributed import Client
client = Client('192.168.1.220:8786')

log = pd.read_csv('800000test', sep='\t')
logd = dd.from_pandas(log,npartitions=20)

#This is the code than runs slowly 
#(2.9 seconds whilst I would expect no more than a few hundred millisencods)

print(len(logd))

#Instead this code is actually running almost 20 times faster than pandas
logd.loc[:'Host'].count().compute()
</code></pre>

<p>Any ideas why this could be happening? It isn't important for me that len runs fast, but I feel that by not understanding this behaviour there is something I am not grasping about the library.</p>

<p><a href="https://i.stack.imgur.com/CBYgO.png"><img src="https://i.stack.imgur.com/CBYgO.png" alt="enter image description here"></a></p>

<p>All of the green boxes correspond to "from_pandas" whilst in this article by Matthew Rocklin <a href="http://matthewrocklin.com/blog/work/2017/01/12/dask-dataframes">http://matthewrocklin.com/blog/work/2017/01/12/dask-dataframes</a> the call graph looks better (len_chunk is called which is significantly faster and the calls don't seem to be locked by and wait for one worker to finish his task before starting the other)</p>

<p><a href="https://i.stack.imgur.com/HBrBV.png"><img src="https://i.stack.imgur.com/HBrBV.png" alt="enter image description here"></a></p>
