Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Out of memory exception #25

Open
gabrielmuresan opened this issue Mar 21, 2014 · 6 comments
Open

Out of memory exception #25

gabrielmuresan opened this issue Mar 21, 2014 · 6 comments

Comments

@gabrielmuresan
Copy link

I tested the plugin and it seems that this plugin can't handle 60 000 rows in ~8 tables. It gives out of memory exception while handling the operations.

The routine is like this.

  1. startup -> we insert in a table (ServerLogs) the information received from server ~60 000 rows now (which can be bigger or smaller)
  2. -> the information in the serverlogs is then processed in batches and then the necessary changes to the other tables is made in this order:
    Insert id 1 in BarTable
    Delete id 1 from Serverlogs
    Insert id 2 in FooTable
    Delete id 2 from ServerLogs
    ... and so on

Looking at the application memory usage it just grows almost constantly after inserting the 60 000 rows the memory usage is somewhere near 190mb and while moving them from serverlogs to the other tables it grows even faster letting me to only be able to handle 10 000 - 15 000 rows in batches of 1000. if the batch is increased, the out of memory error comes earlier in the process.

The maximum memory on a 1GB Windows Phone 8 is 300 mb.

Do you know where it might be the problem in the plugin? did you encounter memory leaks or any memory issues? DO you have some suggestions?

@marcucio
Copy link
Owner

I'm not sure where the memory leak is coming from, it could be from your JS or from the plugin.

By "batches or 1000" do you mean 1000 queries in each transition? If you only put 1 query in each transaction do you see a memory leak? This can help us narrow down where the leak is coming from.

@gabrielmuresan
Copy link
Author

it's just one query "SELECT * FROM ServerLogs LIMIT 1000" for example, and running it 60 times until all ServerLog rows are gone. (because I am deleting them after they are applied)

@gabrielmuresan
Copy link
Author

everything I do the memory keeps filling up. do you have any idea where this could come from?

@marcucio
Copy link
Owner

I'm not sure, I'm not seeing it in my apps. I'm not going to have much time to look into this issue so if you have the ability to look into it then it would be helpful.

@gabrielmuresan
Copy link
Author

if the problem would come from the plugin. do you have any idea where it could be from? what part of the plugin would you suggest on starting to check for this error? just to narrow my search a bit.

thank you in advance

@marcucio
Copy link
Owner

Not sure, I haven't done much to the library in about a year.

It could be coming from the Javascript, maybe the callbacks we save are not getting deleted?

Or it could be coming from the c-sharp sqlite library itself where if this is the case then I don’t really know much about the inner workings of the library.

Mike Marcucio
[email protected]

Website: http://marcucio.com
Blog: http://getitdoneapp.com/blog
Twitter: https://twitter.com/GetItDoneBlog
Facebook: https://www.facebook.com/GetItDoneTasks
Google+: https://plus.google.com/+Marcucio

On Apr 14, 2014, at 2:54 AM, gabrielmuresan [email protected] wrote:

if the problem would come from the plugin. do you have any idea where it could be from? what part of the plugin would you suggest on starting to check for this error? just to narrow my search a bit.

thank you in advance


Reply to this email directly or view it on GitHub.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants