Reduce memory usage in destroy process #186
Comments
It's possible, but not trivial. It's one of the TODO steps before 1.0. The problem is finding all dependencies (say, delete a project with all its tasks with all their comments), and then updating the JS state (removing all deleted items from local cache, notifying observers). If you want to tackle this, or at least part of it, let me know — I'll give you pointers. For quick workarounds, you could try chunking (fetch list.items, and then delete portions of the list in chunks), or you could try issuing a raw SQL query (#103) |
|
Ok, we try with a raw SQL query and it's seems to work very well. Thanks for the tricks I don’t have time in next 2 weeks but maybe after |
|
@ieschalier hey, what's the status of the issue for you? |
|
Hey @radex, currently nobody in my team have time to work on this issue. Usage of raw query do the job, but it's not the more pretty solution. |
|
Understood — thanks for the update! |
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.

Description
With example it must be more understandable.
In case of list with a lot of items, destroy List cause a peak of memory usage.
It must be a real problem in mobile because we have a limit of memory usage, after this limit app is killed by OS.
Proposal
Actually
destroyAllPermanentlyseems to fetch all items one by one and delete then one by one. I think this is done for simplify manage of watermelon cache.Do you think it’s possible to delete with a single query to avoid this peak of memory ?
The text was updated successfully, but these errors were encountered: