[ka-Map-users] Re: kaMap - resource hogger?

Paul Spencer pspencer at dmsolutions.ca
Fri Apr 28 07:09:29 EDT 2006


Venkman, the debugger for firefox, has a profiling mode that could be  
useful in this situation.  We need to find out where it is using all  
the CPU (which functions)

Paul

On 28-Apr-06, at 1:15 AM, ramesh karra wrote:

> This problem occurred again today and when I looked at
> the process statistics, it showed that firefox is
> taking almost 99% of the CPU! Memory usage was OK.
>
> So, it looks like this is not a memory leak related
> issue but CPU hogging issue.
>
> Is it possible that some event is occurring
> constantly?
> How do I debug this? Do I need to use strace/truss
> equivalents on windows? Is there any easier way?
>
> Thanks
> Ramesh
>
> --- ramesh karra <karrarm at yahoo.com> wrote:
>
>> Thanks for the quick and detailed reply paul!
>>
>> I suspected memory leak/garbage collection as the
>> issue but I was not sure if this the case with kaMap
>> or AJAX in general.
>>
>> Are there any tools(like DOM Inspector) available to
>> see what objects are currently (allocated) in the
>> memory?
>>
>> I am using firefox and not IE. Next time, I will
>> keep
>> an eye on the amount of memory in use by firefox.
>>
>> My map data is relatively small and is static. So, I
>> do not expect the mapserver/kaMap to create tiles
>> again and again.
>>
>> Thanks again,
>> Ramesh
>>
>>
>>
>> --- Paul Spencer <pspencer at dmsolutions.ca> wrote:
>>
>>> Ramesh,
>>>
>>> there is a general problem with ajax applications
>>> that involves how
>>> browsers garbage collection memory.  It is
>> possible,
>>> and in fact very
>>> easy, to set up situations where the browser is
>>> unable to release
>>> memory of objects that have no references to them.
>>
>>> This is generally
>>> called a memory leak.  It is highly likely that
>>> ka-Map has such
>>> memory leaks because I don't really understand how
>>> to avoid them.
>>> AJAX-related leaks are much worse in IE than
>>> firefox, so if you are
>>> running IE and ka-Map then when your system
>> becomes
>>> slow, check your
>>> task manager to see how much memory the IE process
>>> is using.
>>>
>>> There is no way that I know of to detect/eliminate
>>> leaks other than
>>> to manually inspect the code and try to figure out
>>> where the leaks
>>> are happening.  Due to the nature of how leaks
>>> happen (closures etc),
>>> this is a very difficult task.  While I do try to
>>> resolve leaks as
>>> best as possible, it is quite likely that they are
>>> still in there.
>>>
>>> The second issue that I will bring up is that
>>> MapServer doesn't
>>> perform that well on my laptop, mostly because
>>> laptops have
>>> harddrives with low RPMs compared to
>> desktop/server
>>> systems and
>>> rendering maps (at least for mapserver) is a
>>> disk-intensive process
>>> (reading spatial data for a large image, writing
>> the
>>> resulting image
>>> to the disk, then reading it again to produce
>>> tiles), and even when
>>> tiles are generated, they have to be read off
>> disk.
>>>
>>> The third issue is that running the client and
>>> server on the same
>>> machine tends to produce resource competition.
>> Your
>>> machine is a
>>> single processor and it can only do one thing at a
>>> time.
>>>
>>> But mostly I suspect memory leaks if it is
>> impacting
>>> other
>>> applications :)
>>>
>>> Cheers
>>>
>>> Paul
>>>
>>> On 27-Apr-06, at 1:53 AM, ramesh karra wrote:
>>>
>>>> Hi,
>>>>
>>>> I have installed mapserver and kaMap on my
>>> laptop(IBM
>>>> T42 with Intel pentium 1.7GHz and 512MB RAM)
>> after
>>>> loading my map and using it for some time, the
>>> system
>>>> becomes very slow(especially Microsoft Outlook).
>>> When
>>>> I closed my browser, system recovered and the
>>> Outlook
>>>> was back to normal.
>>>>
>>>> I am assuming this is related to kaMap and not
>>>> mapserver because mapserver is running all the
>>> time,
>>>> even when the browser is closed. Ofcourse, it
>>> still
>>>> possible that the mapserver is hogging resources
>>> when
>>>> kaMap is active and not when it is gone.
>>>>
>>>> Are there any known resource hogging issues with
>>> kaMap
>>>> or  mapserver?
>>>>
>>>> Thanks
>>>> Ramesh
>>>>
>>>>
>> __________________________________________________
>>>> Do You Yahoo!?
>>>> Tired of spam?  Yahoo! Mail has the best spam
>>> protection around
>>>> http://mail.yahoo.com
>>>
>>>
>>
> +-----------------------------------------------------------------+
>>> |Paul Spencer
>>> pspencer at dmsolutions.ca   |
>>>
>>
> +-----------------------------------------------------------------+
>>> |Applications & Software Development
>>
>>>              |
>>> |DM Solutions Group Inc
>>> http://www.dmsolutions.ca/|
>>>
>>
> +-----------------------------------------------------------------+
>>>
>>>
>>>
>>>
>>>
>>
>>
>> __________________________________________________
>> Do You Yahoo!?
>> Tired of spam?  Yahoo! Mail has the best spam
>> protection around
>> http://mail.yahoo.com
>>
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com

+-----------------------------------------------------------------+
|Paul Spencer                           pspencer at dmsolutions.ca   |
+-----------------------------------------------------------------+
|Applications & Software Development                              |
|DM Solutions Group Inc                 http://www.dmsolutions.ca/|
+-----------------------------------------------------------------+






More information about the ka-Map-users mailing list