# The need for speed (fluid.dataset~ + fluid.datasetquery~)

**URL:** https://discourse.flucoma.org/t/the-need-for-speed-fluid-dataset-fluid-datasetquery/673
**Category:** Pre-Release Toolbox2 Usage
**Created:** [October 4, 2020, 10:19pm UTC](https://discourse.flucoma.org/t/the-need-for-speed-fluid-dataset-fluid-datasetquery/673 "2020-10-04T22:19:51Z")
**Posts on this page:** 1
**Showing post:** 9

<div class="post-metadata">

### Author: ![rodrigo.constanzo](https://discourse.flucoma.org/user_avatar/discourse.flucoma.org/rodrigo.constanzo/32/12_2.png) [@rodrigo.constanzo](https://discourse.flucoma.org/u/rodrigo.constanzo)
#### Post date: [October 9, 2020, 7:58pm UTC](https://discourse.flucoma.org/t/the-need-for-speed-fluid-dataset-fluid-datasetquery/673/9 "2020-10-09T19:58:18Z")

</div>

A little addendum here.

When making what I thought was a [bug report thread](https://discourse.flucoma.org/t/fluid-kdtree-fit-hangs-above-500k-points/675/2) I discovered that `fluid.kdtree~` just take a really really long time to `fit` larger `fluid.dataset~`s.

I managed to `fit` a 1mil point `fluid.kdtree~` and the converging is still happening. The closest matching so far:  
 ![Screenshot 2020-10-09 at 8.53.07 pm](https://discourse.flucoma.org/uploads/default/original/1X/0a2e41319511eecc27ca769e64b8985f9ba199c9.png)

As I noticed in the 200k version above, the duration is super erratic for the kdtree. I guess this is a function of how that tree-based distance matching works in that some may just be closer to stuff (?) so it takes less time, where other things may take longer to match.

The bad news is that it’s still really slow.

This `fit` took over 20min of pinwheeling to compute, so the corresponding `fluid.datasetquery~` version of this would be super unpleasant to test, but coming in at 20min+ per-`fit`, we’re looking at around 36000 times slower than `entrymatcher` if you need to filter or touch the data in any way.

---

_[View the full topic](https://discourse.flucoma.org/t/the-need-for-speed-fluid-dataset-fluid-datasetquery/673)._
