GWT - Charts - Semi-large Dataset getting unresponsive warnings

185 views
Skip to first unread message

Scott

unread,
Feb 5, 2012, 3:35:24 PM2/5/12
to Google Visualization API
I'm working on an app that runs roulette system simulations. I'm
rendering the results using the visualization API for GWT as a line
chart.

I've found if results go above charting 1K data points I start getting
unresponsive script warnings from Firefox and Chrome and IE basically
explodes no matter what.

Is the hang up in rendering the graph from the google server side or
on the client machine?

In terms of solutions:

1) If it's a client side problem could I somehow send the data to my
server side, instantiate the chart there, and simply return it
completed to the browser asynchronously instead of hogging client
resources?

2) Or is the visualization API simply not able to deal with so many
data points?

Many thanks in advance.

asgallant

unread,
Feb 6, 2012, 9:22:05 AM2/6/12
to google-visua...@googlegroups.com
All rendering is done client-side (there is no way around this, client-side being the point of javascript).  The API should not have any trouble with rendering data sets with multiple thousands of points.  Are you running the simulations themselves client-side, or are you doing that server-side and loading the results?

If you can post your code or a link to the page so we can test it, that would be helpful.

Scott

unread,
Feb 7, 2012, 4:13:17 PM2/7/12
to Google Visualization API
Okay, figured out the problem.

When I saw there was an issue with 10,000 data points, I created an
ArrayList using every tenth simulation with a modulus on the iteration
variable to reduce the size. Only accidentally I used the modulus on
the total spins variable not the iterating variable so I was still
charting 10,000 when I thought it was 1000. Stupid mistake, I hadn't
looked at the code in a while.

Anyway, now it's at 2000 data points and everything is working fine in
all browsers. You can take a look here: rouletteidiot.com/
parlaysystemroulette.html

FYI, all the sims are running client side and before adding the
visualization I was just printing text results and it blasted through
them no problem at 10,000 simulations.

asgallant

unread,
Feb 8, 2012, 9:42:08 AM2/8/12
to google-visua...@googlegroups.com
I got a laugh out of that site  >;o)

The only way to win at roulette is to study the behavior of the wheel and discover it's biases, then bet on the biases.  The problem is that someone figured that out a while ago and created a team that bilked the casinos for some millions of dollars before they caught on to what the team was doing.  Now the casinos all swap the wheels around their tables, which changes the biases with each remount of the wheel, so even if you start observing with the first spin of a remount, you can't get enough observations to reliably predict the biases by the time they swap the wheel again, nevermind bet enough times on the wheel to make the averages work in your favor.

NA

unread,
Feb 8, 2012, 1:20:41 PM2/8/12
to Google Visualization API

Everyone knows that to in roulette, you just bet your wife's
birthday. You're guaranteed to do well, even if you don't win the
roulette spin ;)

Incidentally, canoes were added to make prediction even more
difficult. "The Eudaemonic Pie" tells some of the roulette team's
story. The team members are academically and professionally very
highly regarded, and they continue to use mathematics quite
successfully in various ventures.
Reply all
Reply to author
Forward
0 new messages