API is slightly different to rbush (didn't realise it had this when I started), can change if required.
Can also change it to just be new KDBush(data), as it can detect if it's an object or array.
My case for this is that we're deploying something on a serverless architecture that reads points from redis - sorting on every single request is super inefficient and is adding a lot of overhead, this change would enable us to store already sorted data in redis.
API is slightly different to rbush (didn't realise it had this when I started), can change if required.
Can also change it to just be
new KDBush(data)
, as it can detect if it's an object or array.My case for this is that we're deploying something on a serverless architecture that reads points from redis - sorting on every single request is super inefficient and is adding a lot of overhead, this change would enable us to store already sorted data in redis.