[Interest] Question to members of the Qt team: why does an empty project consumes so much memory on iOS?

Nuno Santos nunosantos at imaginando.pt
Tue Apr 21 18:06:26 CEST 2015


Harri,

My apologizes. You are completely right. Simulator reports much more memory than a really device.

I have managed to find an iPad Air and I could see that the memory usage is not like I was seeing in simulator. I was in panic this morning. 

With a real device I have also found the REAL problem that was causing the crashes. It was not memory!!

Thanks!

Regards,

Nuno

> On 21 Apr 2015, at 13:16, Nuno Santos <nunosantos at imaginando.pt> wrote:
> 
> Hummmm, if that is true than I'm probably again looking for an unknown issue.
> 
> The truth is that I don't have an iPad Air so I'm blind.
> 
> I have already identified some useless memory usages.
> 
> I found that rectangles and loaders can actually spend a lot of memory. If I can replace them for items it is better.
> 
> --
> Nuno Santos
> 
> No dia 21/04/2015, às 12:58, Harri Pasanen <harri at mpaja.com <mailto:harri at mpaja.com>> escreveu:
> 
>> I referred to used memory figures.
>> 
>> For the same device, real vs. simulated, the simulator shows 2-2.5 times bigger memory consumption, with the sample size of 2 apps I tried with.
>> 
>> If you suspect images are what is using the memory, you can limit that by dropping to C++ and using QQuickImageProvider to serve the images on demand.
>> 
>> Harri
>> 
>> On 21/04/2015 13:43, Nuno Santos wrote:
>>> Harri,
>>> 
>>> That doesn’t make sense. Simulator is just displaying the real resolution of the device. In retina case 2048x1536. Why would it display something 2.5 times bigger for no apparent reason.
>>> 
>>> I have an iPad 2 and my app was designed in a 1024x768 base. My tests on a real device were on this base. The app memory usage on this conditions on the iPad are about 50Mb.
>>> 
>>> When we go to retina display, the problem is that the display cache multiplies by 4 because the resolution has doubled in both axis. This leads to an increase in memory. This is my guess.
>>> 
>>> I also think that Qt is loading all the libs at once. I cannot explain such a big memory footprint for an empty app.
>>> 
>>> I would like some insights from Qt dev people. 
>>> 
>>> I have been analysing, code portion by code portion and I have already found out interesting things that I will share later.
>>> 
>>> Regards,
>>> 
>>> Nuno Santos
>>> Founder / CEO / CTO
>>> www.imaginando.pt <http://www.imaginando.pt/>
>>> +351 91 621 69 62
>>> 
>>>> On 21 Apr 2015, at 12:36, Harri Pasanen <harri at mpaja.com <mailto:harri at mpaja.com>> wrote:
>>>> 
>>>> On 21/04/2015 10:38, Nuno Santos wrote:
>>>>> I have been comparing the memory usage by an empty iOS and an empty Qt 
>>>>> project on iOS running on an iPad Air. It seems that this is not 
>>>>> comparable. Please take a look to the following image. The iOS native 
>>>>> project uses 16Mb of memory, while the Qt project needs almost 90Mb. 
>>>>> It happens that if the memory limit with an empty project is almost 
>>>>> next to the limit, how can a normal app run smoothly? I have made this 
>>>>> test, after realising that my app was using 160Mb on the iPad Air 
>>>>> simulator. This is huge!
>>>>> 
>>>> 
>>>> Note that the simulator displays about 2.5 times bigger figures than an 
>>>> actual device.
>>>> 
>>>> (Some if it has to do with architecture, Intel seems to need more memory 
>>>> and space than arm).
>>>> 
>>>> Just my 2 cents,
>>>> 
>>>> Harri
>>>> 
>>>> 
>>>> _______________________________________________
>>>> Interest mailing list
>>>> Interest at qt-project.org <mailto:Interest at qt-project.org>
>>>> http://lists.qt-project.org/mailman/listinfo/interest <http://lists.qt-project.org/mailman/listinfo/interest>
>>> 
>> 
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20150421/de23982e/attachment.html>


More information about the Interest mailing list