# Google map performance issue

**URL:** <https://www.ruby-forum.com/t/google-map-performance-issue/133515>\
**Category:** Rails\
**Created:** [April 1, 2008, 7:48am UTC](https://www.ruby-forum.com/t/google-map-performance-issue/133515 "2008-04-01T07:48:53Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![srikanth\_u37](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/90db22/32.png) [@srikanth\_u37](https://www.ruby-forum.com/u/srikanth_u37)\
**Post date:** [April 1, 2008, 7:48am UTC](https://www.ruby-forum.com/t/google-map-performance-issue/133515/1 "2008-04-01T07:48:53Z")

</div>

Hi,

We have an application which reads 1000’s of locations from the xml file  
and will display all those locations in the google map.

We have implemented the following approach for this…

1. Read all the data from xml files at the time of page load and pass it  
to the client side.

2. this data will be used for all the furthur operations on the google  
map.

The above approach is working fine if there are less no of locations.  
But if there are more lcations, it is taking huge amount of time to  
parse the data from xml files.

Is there any better approach to do it. Please help me.

Thanks in Advance

---

<div class="post-metadata">

**Author:** ![srikanth\_u37](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/90db22/32.png) [@srikanth\_u37](https://www.ruby-forum.com/u/srikanth_u37)\
**Post date:** [April 1, 2008, 10:01am UTC](https://www.ruby-forum.com/t/google-map-performance-issue/133515/2 "2008-04-01T10:01:44Z")

</div>

> The above approach is working fine if there are less no of locations.  
> But if there are more lcations, it is taking huge amount of time to  
> parse the data from xml files.
> 
> Is there any better approach to do it. Please help me.

First of all, profile your code. If the bottleneck is the xml parser,  
then what xml parser are you using? If you haven’t already, XMLParser  
([http://www.yoshidam.net/Ruby.html](http://www.yoshidam.net/Ruby.html)) might be worth a look. It’s some  
ruby interfaces to expat so should be pretty speedy.

Fred
