square / crossfilter

Fast n-dimensional filtering and grouping of records.
https://square.github.com/crossfilter/
Other
6.22k stars 1.31k forks source link

crossfilter.quicksort & crossfilter.add not optimized by V8? #136

Closed sylvinus closed 8 years ago

sylvinus commented 9 years ago

Hello!

I've been debugging suboptimal performance with crossfilter. The usual tips helped a lot, then I started profiling what was happening in latest Chrome Mac and saw 2 functions not being optimized by V8 with the message "Not optimized: Optimized too many times". It seems this happens when the type of the return values vary too much.

I know lots of effort have gone into making crossfilter fast already and this may be dumb, but I just wanted to make sure there wasn't any more room for simple improvements :)

Thanks again!

screen shot 2014-12-08 at 22 21 13

markehost commented 8 years ago

+1

drarmstr commented 8 years ago

I've noticed that as well with some Crossfilter functions in Chrome on Windows. Browsers are always a moving target but it's a good question.

averas commented 8 years ago

I have a use case where I need to create a new crossfilter now and then. I have also noticed that even when adding a quite small dataset (~2000 elements) a fair amount of CPU/time is spent on quicksort/add (it takes 1-2 seconds to add 2000 elements). Is this an overhead one should expect or is it related to the non V8-optimisations as described above? Once the data is there performance is good.

RandomEtc commented 8 years ago

Thanks for your contributions and sorry for silence on this side. As discussed in #151 an active fork is being developed in a new Crossfilter Organization. Please take further discussion there (if you haven't already) where it should be warmly welcomed by the new maintainers. Cheers!