Brat Map Problem

Shiawassee

New member
Today, when I bring up the Brat Map, Mozilla Firefox warns me that a script is causing it (Firefox) to run slowly and will probably cause Firefox to stop running.
Sure enough, it soon stops.
This problem did NOT occur yesterday before the announcement of all the different pin colors. Perhaps that addition is the problem?
Dale, CD wannabe appreciating all the hard work the head nerd and the nerdlet have done here... :smile
 
Thanks Brian, should have said.....running Firefox 1.07 on XP Home.

on edit: Just realized problem is on my generic no-name desktop and not on my Dell Latitude laptop...
Dale
 
The error you saw doesn't surprise me...here's the deal, I'll try to keep the nerd-speak to a minimum.

Google maps uses something called overlays for the push-pins - a unique script needs to run for every push-pin on the map. The scripts runs on the client, not on the server - so, the faster your computer, and the more memory you have, the faster the map will load.

Firefox is telling you the truth - loading the map takes a lot of resources. If you are low on available memory or your CPU is heavily loaded, loading the map can take a looooong time, and Firefox gives you the option of bailing.

It became clear rather quickly that having many push-pins slows the loading of the map considerably - once it loads, everything is fine. To demonstrate this, if you click one of the push-pins in the legend with relatively few boats (i.e. anything other than 22 or 25), the map loads very fast.

The "sweet spot" with our current code seems to be around 50 push-pins or less - this loads the map very fast, even on relatively slow computers. There are two ways to address this:

- Limit the push-pins on the initial map

- Optimize the code that loads the map

I'm looking into both, but you can only optimize code so much. From what I've seen, even the most optimized Google map sites limit overlays to 200 - a small fraction of our membership. More likely than not, the permanent solution will be to have some sort of front-end to the map that limits the push-pins. This could be a form that allows you to query just the attributes you are interested in (boat model, state, user, etc.), or something like a labled push-pin per state, indicating the number of boats it has. You could then click the push-pin to zoom in and display more boats.

Short term, I'm looking into having a "Please wait while map loads..." message popup initially, just so folks know something is going on.

So for now...just be patient while the map loads. I'll get the kinks worked out.
 
A "please wait" message won't help a lot of us - Firefox tells us REAL QUICK that our computer is about to go non-responsive as a result of the script that is running...and it does. Patience is a virtue but not a remedy for a non-responsive computer! Looks like it has to be one of the other techniques for us, I will stay tuned until there is a post to try again, because this IS pretty cool! As always, thanks for all your work on this site!


Da Nag":39bhefh5 said:
Short term, I'm looking into having a "Please wait while map loads..." message popup initially, just so folks know something is going on.

So for now...just be patient while the map loads. I'll get the kinks worked out.
 
I'm running Firefox on a mac and I too get the messages that the computer will run slow etc. However, I click through a couple of these and the script runs just fine (as does the rest of the computer...). So my sense is that Firefox's algorithm for predicting that your computer will run out of memory is just not that good/accurate. Try just clicking through the messages and see if things don't work just fine.

Bill
I used the activity monitor in the OS to get a sense of what is happening. In the current state, the script adds about 20Mb to the RAM Firefox is using and never even comes close to pegging the CPU usage on any of my computers. Hence, as mentioned above, I think it's just Firefox being overly "protective" in when its algorithm throws a message. As an aside, the script runs much more slowly under Safari (which is a bigger memory pig than Firefox) and just displays is list of the boats under IE on a mac. I haven't tested it on the PC/Windows side as I assume you do that or would quickly hear from others about issues there.
 
Thanks for the feedback, guys - there's definitley some optimization I can do on our end, you shouldn't have to be waiting so long for the map to load, or putting up with the Firefox messages.

Here's an example of something I'd like to emulate - as you can see, it has almost twice as many markers as we currently do, yet loads far faster, and gives a progress indicator as things load.
 
I know you don't like MS, Bill, but here's what I found. I am running Windows XP Professional on a 2.83g Pentium D with 1 gig of RAM and connecting to the net with 3mb cable. So the system I'm on can't be blamed much. The default IE security settings block two Google cookies when the C-Brat site initially loads, and the map takes close to a minute to load. If the security settings are relaxed to allow the cookies, it goes faster but is still a pain. Basically, a bunch of frap. Folks running IE might do better if they set it to load the cookies.

Now then, the emulation goal you linked to as a sample is far frappin' out!
 
OK Bill, great features. Here's a new challenge: Let's put a GPS transponder on HALCYON so we can keep track of where El and Bill are, we could see them moving, in real time, all over the map! :lol:

Charlie
 
Captains Choice":mpi1s1le said:
OK Bill, great features. Here's a new challenge: Let's put a GPS transponder on HALCYON so we can keep track of where El and Bill are, we could see them moving, in real time, all over the map! :lol:

While I'm guessing your post was in jest, believe it or not, that's been done. There's some phenomenal stuff being done with Google Maps by programmers far more talented than me...

Anyway, the performance problem should now be licked. Details here, for anyone interested.
 
Bill, it was sort of in jest, but having been a ham (the radio kind that is) for almost 50 years, I've worked with something called APRS. This system will put a moving ham radio station on a map and keep track of exactly where it is. Pretty neat, useful, etc. It's the stuff that the black box law enforcement trackers are made out of.

Good work on the map, it's neat and will let us all know where the concentractions of Brats are. That way, we can either congegrate there or avoid them :shock: , whatever our choice is. Now, all we gotta do is get folks to put their zip codes into the system.

Have you thought of a pin for "wannabees". :idea: That would let us lucky owners find them and encourage them to mortgage their futures. :P

Charlie
 
I was going to refrain from this thread, but I too want to say thanks for the map. EXCELLENT WORK!

Ditto the idea for wannabees!
What a great way to help others join in the fun!
I hope that doesn't bog the system down too much....

How about a place for them(or us) to sign up to be contacted for the next event?
 
Non-Nerd Input.

Just an idea, but would it be possible to have several maps? One for each sized boat? Or just East coast, mid-states, West coast?
Since the problem is the Number of pins, is there a logical way to divide and conquer?
I'd hate to have anybody try to redesign the software just so us lazy brats can have a big picture, which we will seldom use. I would be happy with multiple maps if it is easier for THE NERDS.
Uh, is everybody with me on this one??????????
Just an idea...
Fair winds,
John
Y-Landing

PS if this idea was
 
John, I think it's already there. Click on the 16 pin and you get only the 16's, click on the 25 one and you only get 25's. It comes up with all of them but will change when you click on the pins. Also, you can zoom in on any part and recenter it by holding down your left mouse button and dragging the center you want to the center of the pane. Center it where you want and then zoom in with the "+" mark on the left.

Let me know if that answers your question...

Charlie
 
At least I started by saying I was not tech-savy!

Yes, that solves why I couldn't get anything to come up, but...

Two points.
One, someone may want to write a small note that you have to click the pins to get the map.

Two, I still I can't get the "22" page up, again probably that "over 50 units" limit coming back.

If that is the case, I just think that if you can divide the map into sections, maybe northeast, northwest, etc, we could keep the cool maps and they would continue to function.
This is not to tell anybody what to do, just to a non-techie (trekkie, whatever) it seems it would be an easier fix than writing software.

Thanks for tolerating the a voice from the uneducated masses!
Fair winds...
 
New Guy":1zxs44b7 said:
Two points. One, someone may want to write a small note that you have to click the pins to get the map.

I wrote up instructions that include that bit of info in the Brat Map announcement (link here), but it's probably a good idea to link back to them from the map. Should be easy enough to do, I'll come up with a "Help" link.

New Guy":1zxs44b7 said:
Two, I still I can't get the "22" page up, again probably that "over 50 units" limit coming back.

I was just about to give you the old "can't reproduce the problem" response, but you're right - there was a bug in the code. Fancy that.

Problem was - somebody recently added a zip code, which should have stuck them on the map. Trouble is, their username had an apostrophe in it, which broke the map code - it's been taken care of.

New Guy":1zxs44b7 said:
If that is the case, I just think that if you can divide the map into sections, maybe northeast, northwest, etc, we could keep the cool maps and they would continue to function.

Good idea, and something along those lines will be coming. However, with the "new and improved" code, the map should draw pretty quickly now, regardless of the number of push-pins on it.

And...for those of you dedicated enough to read through all of this, here's a sneak peak at a work in progress...I'm sure if you look at it for a few seconds, you'll realize what it's going to be.
 
Back
Top