Red-Folder / Cordova-Plugin-BackgroundService

BackroundService plugin for use with Cordova (PhoneGap)
144 stars 85 forks source link

memory size issue #1

Closed Geeknux closed 11 years ago

Geeknux commented 11 years ago

Hi, I'm using phonegap 2.3 and only run one process just like your twitter sample, it checks a url and fetch with json, etc. (exactly like you sample).

sometimes when i close the program not just pause it, i close it by this command: "navigator.app.exitApp();" when i check the running process i find out most of the time my application take 50MB or more memory size. but sometimes it take just 1.6MB more or less. so what is wrong with it? i think 50MB it's very annoying for a simple background process.

Red-Folder commented 11 years ago

Firstly a short disclaimer; My Twitter example is not production code. It has never been tested for memory leaks and should be used for learning purposes only.

In an effort to try and help however; What makes you think that it is the background service that is causing the memory problem? Do you have evidence to support that (screenshots or anything similar would be great)? How big is the data you are pulling via JSON? How often are you pulling that data? How quickly does memory use grow (and is it inline with JSON requests)? What are you doing with the JSON data? Is that causing the memory growth? Do you see the same memory problem when you run my Twitter example (ie. can we narrow down to my example or is it something within your code)?

Red-Folder commented 11 years ago

Also worth mentioning that I haven't tested the background service plugin against 2.3 or 2.4 (the versions come so thick and fast that I generally don't have a chance to keep up).

Red-Folder commented 11 years ago

Closed this issue as no further correspondence.,