I run the Nativescript code from https://github.com/NativeScript/tutorials/tree/main/angular-tutorial. I found that the memory allocation is increasing when I navigate from home page to detail page then navigate back from detail pages to home page multiple times. Would like to get your suggestions or idea how to stop memory allocation increasing since it will run out of memory at some point. Thank you in advance.
Related
i have a meteor project (web not app) and when i view the site on my iphone over wifi it works great, but when i view the site over LTE i see a white page or sometimes a black page. this implies to me that the site is taking too long to download too much so the browser is giving up. (maybe i'm in left field)
so, i was wondering if anyone knows how to measure how large the initial meteor download will be for the first page. and some tips to minimize that size.
for example, i know there are some stock images that i can remove from my code but what i'd like to see is how much of an impact that is making (if any), and to look for additional optimizations to shrink that initial download size.
also, if there are other gotchas to be aware of in this case, i'd love to hear those as well.
In Chrome open your site then open the inspector and go to the Network tab and hit shift-cmd-R. This will completely reload the page and measure the network traffic. At the bottom of the chart you'll get a summary of network requests and bytes transferred such as:
33 requests | 31.4KB tranferred | etc...
I have a huge web page (text) and it takes lot of time to load in the browser. So I want it to be loaded in steps and not at time. Initially it should load some x lines or whatever space available on the screen. When I start scrolling it should load next x lines. For a huge web page, while loading the page, browse hangs for a while, So I want to avoid this condition. Please help.
Thanks,
snk.
I have an app that opens a stagewebview window on one of it's pages to display a few specifics websites. I'm in the process of performance optimizing it and I've seemed to hit a snag with the stagewebview pages.
On all of the other pages, after a few seconds of idling the memory/cpu usage drops back down to near starting levels, but if I open the stagewebview window it appears to permanently increase the memory/cpu usage by upwards of 30-40 MB, and garbage collection doesn't seem to be able to bring it back down.
This is what I'm using to clean it up:
myWebView.viewPort=null;
myWebView.dispose();
myWebView=null;
There are no event listeners associated with it. Does anyone know if this is an inherent problem with stagewebview, or am I just doing something wrong?
We faced the Same issue with the mx:Html desktop component, the main reason for this that the dom tree is built and added to your app which increase the memory, we used the following trick (it helps alot but not remove all added memory):
myWebView.loadString("");//and for desktop myHtml.loadHtml("");
this way you clean the old dom tree and create an empty one with minimum resources, i believe they should add a new function for clean up, until then we can use this workaround, hope this help :).
I have a Windows Phone 7.5 / Silverlight App.
Each page has 4-5 images, 4-5 storyboard animations and 2 textblocks. It also has 2-3 soundEffects.
User can navigate from page1 to page 15. As soon as I reach page 10 the memory consumption goes beyond 90MB, which is the limit.
I read this: http://windowsteamblog.com/windows_phone/b/wpdev/archive/2012/02/01/memory-profiling-for-application-performance.aspx but I am not able to determine exactly what is wrong in my app.
I want to push this app as beta asap but it is failing on Peak Memory Consumption Test when I run Marketplace Test Kit.
Any other pointers or resources?
Thanks.
Added Images:
There are 18 instances of Grid, which is one per page. Is it ok to have an instace of grid to be in the memory even if I have navigated away from the page?
Updated - Profiler snapshot when memory is above 90Mb: Also as I noted each of my page is in the memory and not sure from where 46 grid instance come from. I have also added GC.Collect when I move to next page. Not sure if that matters.
Updated -Link to code for a control that allow to go to nextpage: http://pastebin.com/ZnBaWfZU
I had to re-work my navigation since each page was left behind in the backstack, it was taking up the memory.
Here are few things I did:
1: In the OnNavigateFrom, I had to stop all the animations and set them to null. Same thing for all SoundEffects. Disposed the SoundEffectInstances.
2: In the OnNavigatedTo, I manually calle NavigateService.RemoveBackEntry() to remove the page from backstack and then call GC.Collect().
Hope this helps. Feel free to comment if there's anything wrong using the above solution.
My app is using roughly 300mb. I checked all objects i created with new and wrote a using around it if it had a dispose interface. Now with the web browser control i visit rougly 450 pages all which have ads on them and many use ajax request so for sure more then 1k request.
Why is the app taking that much memory? i did notice i can click the page and hit back to visit a previous page but AFAIK IE wouldnt use up that many MBs after visiting that many pages (i dont want to hit 450 unique pages by hand to check). So why do i have these memory issues?
Which IE version are you using? The problem you describe is typical to IE5 and IE6 to a lesser degree.
I remember the days when we had to recycle an IE5 WebBrowser object because of memory leaks.
I'm not sure, but I believe the situation should be better with current generation IE.