views:

36

answers:

2

I am developing a Web Application. I have the feeling, that the browsers memory consumption is higher than it should be with my application. Is there a way or tool by which I can see what parts do consume the memory of the browser?

A: 

How about profiling?

"A (code) profiler is a performance analysis tool that, most commonly, measures only the frequency and duration of function calls, but there are other specific types of profilers (e.g. memory profilers) in addition to more comprehensive profilers, capable of gathering extensive performance data"

tafa
A: 

One of the Microsoft utilities (assuming you are using Windows) you can use is LeakDiag (see ftp://ftp.microsoft.com/PSS/Tools/Developer%20Support%20Tools/LeakDiag/). With LeakDiag you can take 'memory snapshots'of the application. You can use it as follows:

  • Start the application
  • Warm up the application (by doing some typical actions)
  • Run LeakDiag to make a first snapshot
  • Do some more typical actions
  • Run LeakDiag to make a second snapshot
  • Run LeakDiag to compare the 2 snapshots and see what caused the additional memory consumption

Possible problem in FireFox might be that FireFox has its own memory manager, not the standard C/C++ run time (at least that's what I think), so you may not find the actual problem this way (as FireFox's memory manager simply hides all exact memory allocations from the system).

EDIT: you can do something similar with the GFLAGS and UMDH utilities from Microsoft's Debugging Tools for Windows.

Patrick