question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Improving boxplot performance

See original GitHub issue

Hi,

I’m trying to use dc.js to generate dynamic boxplots, but was having some performance issues with larger datasets (~50k float entries). I narrowed the issue down to this line under the reduce().reduceRemove function (taken from example):

p.splice(p.indexOf(v.Speed), 1);

I was thinking that if the p returned was pre-sorted (I’d imagine that the boxplot function already sorts the array to calculate quartiles) so that a more efficient binary search tree can be used to find the index for the splice. Is this something that can be implemented?

Thanks

Issue Analytics

  • State:closed
  • Created 10 years ago
  • Comments:8 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
mrmin123commented, Mar 17, 2014

Hi. Not sure what you mean by profiling this. If you mean benchmarking, no real benchmarks, but there were noticeable differences when I used d3.bisectLeft as you suggested. Huge improvements when combined with underscore.js’s indexOf function flagged to use binary search:

speedArrayGroup = experimentDimension.group().reduce(
        function(p,v) {
          p.splice(d3.bisectLeft(p, v.Speed), 0, v.Speed);
          return p;
        },
        function(p,v) {
          p.splice(_.indexOf(p, v.Speed, true), 1);
          return p;
        },
        function() {
          return [];
        }
      );

If you feel that this can be further improved, please let me know.

Thanks!

0reactions
gordonwoodhullcommented, Apr 9, 2019

Moving the pre-sorting option to #1527. Fixing the examples now.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Making the most of box plots — Blog - Musgrave Analytics
Here we suggest some ways to make the box plot more accessible to a ... To improve box plots and make them more...
Read more >
A Bird's Eye View Via Boxplot - Catchpoint Systems
Performance impact can be measured and analyzed in many ways. In this blog, we explore how a boxplot can be used to achieve...
Read more >
A Complete Guide to Box Plots | Tutorial by Chartio
Box plots are a streamlined way of summarizing the distribution of groups of data. Read this article to learn how to best use...
Read more >
Box Plot – Continuous Improvement Toolkit
Box plots are most useful when comparing between several data sets. They allow to compare the central tendency as well as the variability...
Read more >
Introducing Improved Performance of Boxplot (New Method) in ...
This research is aimed to examine effective various processing techniques (i.e., univariate statistical methods) in the analysis of stream ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found