nin.com doesn't crash my phone/safari (iPhone5, 7.1.4) no matter how fast I scroll or how much cr@p is loaded in the background etc.
It crashes my iPad Air running iOS 7.1 beta 2 all the time, even after starting the system fresh.
nin.com doesn't crash my phone/safari (iPhone5, 7.1.4) no matter how fast I scroll or how much cr@p is loaded in the background etc.
It crashes my iPad Air running iOS 7.1 beta 2 all the time, even after starting the system fresh.
Turns out I was right.
My benchmark app is ready. As usual, I've made the entire project available. It's available at https://dl.dropboxusercontent.com/u/81986513/122013/WebPageMemoryTester.zip and can be used for your benchmarks too.
I've made it VERY simple it doesn't even have XIB's. The view controller, WebPageMemoryTesterViewController, (programmatically) creates an instance of UIWebView with the size of the full screen (minus the upper status bar, of course) and adds it as a subview to the current view. Then, it starts loading nin.com and starts a timer ([NSTimer scheduledTimerWithTimeInterval:0.5 target:self selectorselector(print_free_memory) userInfo:nil repeats:YES], which, by calling print_free_memory (based on http://stackoverflow.com/questions/5012886/knowing-available-ram-on-an-ios-device ) displays not only the free /used memory, but also their difference between the first and previous value of the current free memory and the original / previous one (this is what the origFreeMem and prevFreeMem globals are for. The third global, int seccounter;, makes it simply easier to spot time differerences as I've opted for using printf()'s instead of NSLog()'s to hide the usual NSLog prefixes).
I also directly call print_free_memory from not only the timer, but also immediately before and after creating UIWebView and immediately starting to load the web page into it. Also, I directly call it from the didReceiveMemoryWarning method so that we can see how much free memory the system had upon the warning.
I've run the tests on several of my devices, with various iOS versions and screen resolutions. I've reset every device before the tests so that they can have as much free RAM as possible. Three of the devices are JB'n but this fact didn't really have any effect on the results. After all, the free RAM of my non-JB'n 7.0.4 iPad 3 was 659349504, while that of my 6.1.2-based, JB'n iPad 3 was 625999872 that is, some 35 Mbytes only.
The results certainly show what I talked about:
- UIWebView consumes a LOT of memory. Retina iPad 3's with 1 GB memory simply can't even load it because the page just won't fit into the memory, regardless of the OS version.
- the higher the screen resolution, the significantly(!) more memory used. This is certainly visible if you compare the iPad2 figures to those of the two iPad 3's. The non-retina iPad 2 allocates significantly less memory when loading / scrolling around the page and, if you don't scroll too quickly, you can actually have a chance to be able to read it entirely.
- the number of pixels of the 640*1136 iPhone 5 is around the same (727k) as that of the 1024*768 iPad 2 (786k). Still, the former consumes almost two times more memory to load / render the same webpage (I would have expected the iPad 2 to consume somewhat more memory because of the higher-res screen). Dunno if this is caused by the iPhone 5 running 7.0.4 and the iPad 2 only 6.1.2.
Links to logs + more thorough explanation:
The 5.1.1-based, JB'n iPhone 3GS couldn't even load the page. As you can check out in the full log at , in second 42, immediately before didReceiveMemoryWarning being invoked, we only had 3.5Mbytes (3555328) of free RAM, while the Web page has already been allocated 104Mbytes (104001536):
84; DIFF ORIG: 104001536; DIFF PREV: 471040
used: 73666560 free: 3555328 total: 77221888
The 4.3.3-based, non-JB'n iPod touch 4 crashed at loading too (after allocating 85M (85803008) bytes; full log: https://dl.dropboxusercontent.com/u/81986513/122013/14UIwebView/ipt4g.txt ):
didReceiveMemoryWarning; 100; DIFF ORIG: 85803008; DIFF PREV: -647168
used: 60604416 free: 2506752 total: 63111168
The 7.0.4-based, non-JB'n iPhone 5 started with 626Mbytes of free RAM (626913280; full log: https://dl.dropboxusercontent.com/u/81986513/122013/14UIwebView/ip5.txt ). It has finished loading the entire page at around the 55th second (around tick 110), allocating 335 Mbytes (335597568) in the process:
111; DIFF ORIG: 335597568; DIFF PREV: 0
used: 378970112 free: 291315712 total: 670285824
Then, I started to (quite slowly fast scrolling would have crashed the widget) scroll down. During this, I've encountered several didReceiveMemoryWarning invocations. Then, the free RAM was around 70 Mbytes (70344704; a considerable drop from the 291M free after loading the page) and the widget allocated itself around 556 Mbytes (556568576):
129; DIFF ORIG: 556568576; DIFF PREV: 131567616
used: 577814528 free: 70344704 total: 648159232
After getting to the bottom and waiting a bit for everything possible to be released, I regained most of my, during the scrolling, missing free memory, which was around 274M (274776064); that is, not much less than the starting 291M:
145; DIFF ORIG: 352137216; DIFF PREV: -8192
used: 432508928 free: 274776064 total: 707284992
Then, a quick scroll to the top (by tapping the status bar) could have easily crashed the app as it, at the worst half-second, resulted in only 38Mbytes (38494208) remaining free:
153; DIFF ORIG: 588419072; DIFF PREV: 13512704
used: 527482880 free: 38494208 total: 565977088
The 7.0.4-based, non-JB'n iPad 3 couldn't load the page either (full log: https://dl.dropboxusercontent.com/u/81986513/122013/14UIwebView/ipad3.txt ). Very soon after UIWebView had allocated around 650 Mbytes (648257536) and there remained only 11Mbytes of RAM (11091968), it crashed:
didReceiveMemoryWarning; 31; DIFF ORIG: 648257536; DIFF PREV: 79646720
used: 468738048 free: 11091968 total: 479830016
The 6.1.2-based, JB'n iPad 3, starting with a free memory of around 625 Mbytes (625999872), received its first didReceiveMemoryWarning callback at around 80 Mbytes of free (80945152) and, then, after half a second later, crashed at 8MB free (8798208), with the Web widget having allocated 617Mbyte (617201664) (full log: https://dl.dropboxusercontent.com/u/81986513/122013/14UIwebView/ipad3-612.txt ):
didReceiveMemoryWarning; 25; DIFF ORIG: 545054720; DIFF PREV: 22192128
used: 465739776 free: 80945152 total: 546684928
26; DIFF ORIG: 617201664; DIFF PREV: 72146944
used: 517550080 free: 8798208 total: 526348288
The 6.1.2-based, JB'n iPad 2 only allocated around 200 Mbytes (201277440) of RAM to load the entire page with just a little bit (10Mbytes) of free RAM (10838016); see for example (full log: https://dl.dropboxusercontent.com/u/81986513/122013/14UIwebView/ipad2.txt )
177; DIFF ORIG: 201277440; DIFF PREV: 0
used: 165519360 free: 10838016 total: 176357376
I started (slowly) scrolling down at tick 177; apart from occasional didReceiveMemoryWarning invocations, this could be done without crashing. So could I tap the upper status bar to quickly return to the top.
----------
(Just a quick note: see my benchmarks above.)
Great job! Maybe would make sense to send such benfhmarks to Apple no?
They've certaintly been aware of the problem for years. I don't think they want to fix it -it might be "good enough" for them. It could be fixed by them, even w/o adding additional RAM, purely in software.
Seems like a very minimal .1 upgrade. Used to be .1 updates included lots of new features, not just more bug fixes.
Turns out I was right.
- the number of pixels of the 640*1136 iPhone 5 is around the same (727k) as that of the 1024*768 iPad 2 (786k). Still, the former consumes almost two times more memory to load / render the same webpage (I would have expected the iPad 2 to consume somewhat more memory because of the higher-res screen). Dunno if this is caused by the iPhone 5 running 7.0.4 and the iPad 2 only 6.1.2.
good for you for doing all that testing... but mine works fine! Go figure. In fact, I can't remember the last time anything crashed on this phone, let alone safari...
That, tbh, makes the results of your benchmark rather useless. A more scientific approach would rule out (i.e. keep the same) as much variables as possible, and the only thing you're actually prooving here is that the culprit is probably more iOS7 than a structural starvation of RAM.
Nonetheless, this appears to be a software issue and not, as some keep claiming, an unfixable hardware issue.
Which more or less confirms my suspicions that I had based on the fact that my old iPad mini could, running iOS7 and with a meager 512MB of RAM, keep more Safari tabs in memory than my new rMini.
I don't think they will - at least in the near future. This, as I've pointed out above, has always been one of the Achilles' heel of iOS. They have been aware of it at least since 2008 - particularly since 2010, when the iPad 1 and the iPhone 4 was introduced with vastly higher UIWebView memory requirements (because of the higher-res screens). They would have surely acted if they had wanted to in these years.
Absolutely wrong. See my previous post: the page itself is Safari / iOS-compatible and has no incompatible constructs immediately crashing the browser.
This is why it's actually possible to browse it, in its entirety, on non-Retina iPad 2's or the iPhone 5, both under both iOS 6 and 7. If you don't scroll too quickly and reset the device before browsing, of course.
All these crashes are because of the Web widget's (on which Safari is also based) enormous memory usage. Which, as has also been explained, could easily have been remedied by increasing the RAM to, say, 2 Gbytes.
So you're arguing that they shouldn't because they haven't? I know we have more and more resources with each new device, but that doesn't mean you need to hog it all when it could be made to be more efficient.
Nope... they're highly unlikely to, not shouldn't. I'd be too very happy to see it fixed but, given that they haven't bothered fixing it for 4+ years, I don't have high hopes.
This is a Beta, crashes are expected.
Next time don't run a beta if you want an unstable device! I'm willing to put up with it to try new features and know what's coming, but I know the cost.
2. back in the Windows Mobile times, I used my own 600kbyte test page, with tons of inline, small images (but no videos) to test memory consumption (and other benchmarks like page loading speed). (It's at http://winmobiletech.com/a/1.html ) I'll re-test these browsers with this page and report back.
Seems like a very minimal .1 upgrade. Used to be .1 updates included lots of new features, not just more bug fixes.
I hope this fixes the "inadvertent Safari poof" bug (Safari closes suddenly).
Didn't have that on my 4S until iOS 7.
Interesting, I didn't realize those were connected. Good to know.If you turn on list view in the calendar app, your events appear in list mode in Notification Center.
here are my thoughts abt beta 2,
settings crashes a lot, even notification submenu on settings app crashes so much BUT
ios 7.1 beta 2 is so much faster, animations are fast even with reduce motion off.
if u turn on reduce motion, it works awesome specially on iphone 4s.
the phone app still has a slight animation delay before its usable. kinda annoying.
all apps works just fine, atleast for me.
the dark keyboard when u use spotlight is very glitchy, i get lines that appears on my screen when i press the lower bottom keys.
the keyboard rotation lag still persists but not as they were in previous versions.
i am not sure if auto updates still works because everytime i go to app store app , i find new apps updates which then start to download automatically.
siri still sucks
overall i am very happy with it. its so much better than 7.0.4
fardeenah is online now Report Post
I never understood all the hysterics around buttons. Do people seriously not know what to tap? Thankfully this feature is optional.
Bingo. A lot of people just don't think about things of that nature and have a hard time imagining different kinds of people using the phone differently (if they even care to do so to begin with).I don't think its hysteria - when you have vision problems or are of the older generation, stuff like this that make it more obvious really help.
Bingo. A lot of people just don't think about things of that nature and have a hard time imagining different kinds of people using the phone differently (if they even care to do so to begin with).