We currently execute `PRAGMA incremental_vacuum` as a simple statement (ignoring any results) which leads to freeing just one page at a time. The pragma needs to be executed as a statement returning rows. See https://stackoverflow.com/questions/53746807/sqlite-incremental-vacuum-removing-only-one-free-page So https://searchfox.org/mozilla-central/rev/11a4d97a7b5cdfa133f4bda4525649f651703018/dom/indexedDB/ActorsParent.cpp#7063 should be replaced with a loop which calls `ExecuteStep` until there are more results. We can probably get rid of the split into 10% chunks, see https://searchfox.org/mozilla-central/rev/11a4d97a7b5cdfa133f4bda4525649f651703018/dom/indexedDB/ActorsParent.cpp#7009 because `ExecuteStep` frees one page at a time anyway and we can check for pending events in the new loop which will provide better reaction when the connection suddenly becomes active. I also suspect that we free just one page at https://searchfox.org/mozilla-central/rev/11a4d97a7b5cdfa133f4bda4525649f651703018/dom/indexedDB/ActorsParent.cpp#13770 It seems that pragma needs to be executed using a loop and `ExecuteStep` as well.
Bug 1833473 Comment 0 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
We currently execute `PRAGMA incremental_vacuum` as a simple statement (ignoring any results) which leads to freeing just one page at a time. The pragma needs to be executed as a statement returning rows. See https://stackoverflow.com/questions/53746807/sqlite-incremental-vacuum-removing-only-one-free-page So https://searchfox.org/mozilla-central/rev/11a4d97a7b5cdfa133f4bda4525649f651703018/dom/indexedDB/ActorsParent.cpp#7063 should be replaced with a loop which calls `ExecuteStep` while there are more results. We can probably get rid of the split into 10% chunks, see https://searchfox.org/mozilla-central/rev/11a4d97a7b5cdfa133f4bda4525649f651703018/dom/indexedDB/ActorsParent.cpp#7009 because `ExecuteStep` frees one page at a time anyway and we can check for pending events in the new loop which will provide better reaction when the connection suddenly becomes active. I also suspect that we free just one page at https://searchfox.org/mozilla-central/rev/11a4d97a7b5cdfa133f4bda4525649f651703018/dom/indexedDB/ActorsParent.cpp#13770 It seems that pragma needs to be executed using a loop and `ExecuteStep` as well.
We currently execute `PRAGMA incremental_vacuum` as a simple statement (ignoring any results) which leads to freeing just one page at a time. The pragma needs to be executed as a statement returning rows. See https://stackoverflow.com/questions/53746807/sqlite-incremental-vacuum-removing-only-one-free-page So https://searchfox.org/mozilla-central/rev/11a4d97a7b5cdfa133f4bda4525649f651703018/dom/indexedDB/ActorsParent.cpp#7063 should be replaced with a loop which calls `ExecuteStep` until there are no results. We can probably get rid of the split into 10% chunks, see https://searchfox.org/mozilla-central/rev/11a4d97a7b5cdfa133f4bda4525649f651703018/dom/indexedDB/ActorsParent.cpp#7009 because `ExecuteStep` frees one page at a time anyway and we can check for pending events in the new loop which will provide better reaction when the connection suddenly becomes active. I also suspect that we free just one page at https://searchfox.org/mozilla-central/rev/11a4d97a7b5cdfa133f4bda4525649f651703018/dom/indexedDB/ActorsParent.cpp#13770 It seems that pragma needs to be executed using a loop and `ExecuteStep` as well.