The application takes up too much space in RAM, which leads to the closure of the application

I have a problem with the application in which I create the RAM BB 9800 is too small.

I have an html5 application that I use on iOS and Blackberry. I am using the phonegap plugin to output the form server using Sybase .

Everything works fine on iOS, but on blackberry I often get the message “low memory, please stop the application” and the only application works on mine. And usually this is followed by "closing the application because it is too large."

How can I either increase the available memory for my application (unlikely) or reduce the amount that my application uses (tooltips and guidelines)

I use:

  • Sencha Touch for our interface
  • Phonegap to access your own api
  • Sybase synchronize between our local data and server data

  • There are no toolboxes - only one is sencha touch

  • everything loads in index.html - no ajax at all
  • index.html is a local file - no download request

Sencha uses DOM material - not all screens in one main DOM - screens are created on request.

+4
source share
1 answer

You mentioned that you are retrieving data from Sybase - is this when you get this memory error?

Unfortunately, sencha / phonegap / sybase sync / your js will take memory (especially since all this is on one page), and this framework is large enough to cause problems ...

My suggestions:

  • If the error only occurs when loading data, the question is how much data do you download? maybe he is trying to load 1gb of data and trying to do this in memory? I would look at server side page paging to reduce the amount of your data.

  • try splitting it into several .html pages, each of which does a subset of the work you are currently doing in one large file ...

Hope this helps

+1
source

Source: https://habr.com/ru/post/1385907/


All Articles