You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-11-29 22:48:10 +02:00
Mobile: Fixes #1690 (maybe): Process less data simultaneously when building search index to prevent out of memory errors
This commit is contained in:
@@ -26,7 +26,7 @@ class ResourceService extends BaseService {
|
|||||||
WHERE item_type = ?
|
WHERE item_type = ?
|
||||||
AND id > ?
|
AND id > ?
|
||||||
ORDER BY id ASC
|
ORDER BY id ASC
|
||||||
LIMIT 100
|
LIMIT 10
|
||||||
`, [BaseModel.TYPE_NOTE, Setting.value('resourceService.lastProcessedChangeId')]);
|
`, [BaseModel.TYPE_NOTE, Setting.value('resourceService.lastProcessedChangeId')]);
|
||||||
|
|
||||||
if (!changes.length) break;
|
if (!changes.length) break;
|
||||||
|
|||||||
@@ -131,7 +131,7 @@ class SearchEngine {
|
|||||||
WHERE item_type = ?
|
WHERE item_type = ?
|
||||||
AND id > ?
|
AND id > ?
|
||||||
ORDER BY id ASC
|
ORDER BY id ASC
|
||||||
LIMIT 100
|
LIMIT 10
|
||||||
`, [BaseModel.TYPE_NOTE, lastChangeId]);
|
`, [BaseModel.TYPE_NOTE, lastChangeId]);
|
||||||
|
|
||||||
const maxRow = await ItemChange.db().selectOne('SELECT max(id) FROM item_changes');
|
const maxRow = await ItemChange.db().selectOne('SELECT max(id) FROM item_changes');
|
||||||
|
|||||||
Reference in New Issue
Block a user