1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-24 10:27: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:
Laurent Cozic 2019-06-28 23:49:43 +01:00
parent fd150b5b9d
commit 2955914ca5
2 changed files with 2 additions and 2 deletions

View File

@ -26,7 +26,7 @@ class ResourceService extends BaseService {
WHERE item_type = ?
AND id > ?
ORDER BY id ASC
LIMIT 100
LIMIT 10
`, [BaseModel.TYPE_NOTE, Setting.value('resourceService.lastProcessedChangeId')]);
if (!changes.length) break;

View File

@ -131,7 +131,7 @@ class SearchEngine {
WHERE item_type = ?
AND id > ?
ORDER BY id ASC
LIMIT 100
LIMIT 10
`, [BaseModel.TYPE_NOTE, lastChangeId]);
const maxRow = await ItemChange.db().selectOne('SELECT max(id) FROM item_changes');