-1

enter image description hereI have a xpage that uses dojo, extjs5 and jquery frameworks. Its one single page that contains about 20 grids including some tree grids. some of the grids are very large (about 50 columns). Since the grids are interrelated they are kept in single page hidden/shown based on user selection on the left pane.

I checked the memory usage in IE11 developer tools. Its started around 300MB but quickly grows to nearly 1 gb. After everything loaded it was stable around 364MB but as I was taking snapshots it was climbing and staying there. The other major worry is the total object count which is around 230000. I don't have a clue where to start. Not even sure if its possible to address this issue. I have attached some screenshot of memory usage.

Appreciate any expert advice to address this issue, thanks in advance

Community
  • 1
  • 1
lense
  • 55
  • 2
  • 10
  • Silly question but since it's a LOT of data that the browser is having to handle are you sure that this isn't "normal"? – David Leedy Aug 16 '14 at 23:24
  • That's a browser question. Short: if you think big, it's big. With todays hardware it shouldn't be an issue. If it is you need to split it up - I'm sure your users would hate it – stwissel Aug 17 '14 at 02:31
  • You should Check what objects that consume the memory if it's unordinary. Javascript engines today are very efficient and uses the memory of your machine. Try the same page on a lower memory machine i.e. in Virtualbox and see if you get the same result/speed of the page – Fredrik Norling Aug 17 '14 at 10:49
  • Thank you all. I was able to movew few things like loading some stores to different events like clicking on specific navigation links. I also tried with different browsers different machine and it produced better results when tested in chrome and machine with higher cpu. – lense Aug 20 '14 at 02:53

2 Answers2

1

You should Check what objects that consume the memory if it's unordinary. Use the memory profiling options in Google Chrome web developer tools to check that.

Check out these links to find out if something is wrong

Finding JavaScript memory leaks with Chrome

https://developer.chrome.com/devtools/docs/javascript-memory-profiling

https://developer.chrome.com/devtools/docs/heap-profiling

Javascript engines today are very efficient and uses the memory of your machine. Try the same page on a lower memory machine i.e. in Virtualbox and see if you get the same result/speed of the page

Community
  • 1
  • 1
Fredrik Norling
  • 3,461
  • 17
  • 21
  • Thanks Fredrik Norling. when I tried with another machine with better cpu it did consume lesser memory, iam not quite sure if there is any link. One other thing is when I used profiling in IE memory jumps and if I don't then it stays fine. – lense Aug 20 '14 at 02:55
0

I'd expect more memory to be used as the page is rendering (nearly 1gb), then a relaxaton as working memory/stacks etc are released by the browser.

I would also guess that if you're using 3 frameworks ( dojo, jquery, extjs5 ) that would generate potentially a lot of objects. 230,000 seems like a lot, but I daresay even a simple page results in quite a lot. Maybe try loading & analysing a fairly simple web page to see what a "non hefty" page looks like as a comparison ?

However the fact that it's rising over time may be an indication of a memory leak.

Is the page "doing stuff" while you leave it alone (maybe a times operaton / heartbeat?) If that's the case, perhaps this is responsible for slowy eating memory.

If you establish that this isn't the case, maybe try the same thing in different browsers and see if any of them slowly eat memory ? If not an issue in other browsers it hints at an IE -specific memory leak which, as the elders in the village will confirm, is not unheard of.

user2808054
  • 1,376
  • 1
  • 11
  • 19
  • Thanks. Yes using 3 frameworks cause lot of objects. It is perhaps not best design to use 3 different frameworks but there are few very important functionalities available on each of these frameworks that lead to this decision. But this is one area we are currently working to see if we can atleast eliminate creating duplicate objects (like creating extjs and dojo store for same data). – lense Aug 20 '14 at 03:01
  • Yea that would help. We have a similar sitaution where we sometimes end up using jquery and dojo- historically, jquery is out favourite but a relatively new platform uses dojo by default. Argh! I guess there's no "magic solution" for speed/ memory usage so it comes down to generally making things more efficient. Saying that, it's only a problem if someone finds it runs slowly etc. – user2808054 Aug 20 '14 at 08:53