mirror of
https://github.com/laurent22/joplin.git
synced 2024-12-24 10:27:10 +02:00
Server: Increase number of items that are returned during sync
This commit is contained in:
parent
f698068587
commit
767bf9f002
@ -34,7 +34,7 @@ export interface ChangePreviousItem {
|
||||
|
||||
export function defaultDeltaPagination(): ChangePagination {
|
||||
return {
|
||||
limit: 100,
|
||||
limit: 200,
|
||||
cursor: '',
|
||||
};
|
||||
}
|
||||
@ -139,6 +139,8 @@ export default class ChangeModel extends BaseModel<Change> {
|
||||
// as the `changes` table grew. So it is now split into two queries
|
||||
// merged by a UNION ALL.
|
||||
|
||||
const subQueryLimit = Math.ceil(limit / 2);
|
||||
|
||||
const fields = [
|
||||
'id',
|
||||
'item_id',
|
||||
@ -167,7 +169,7 @@ export default class ChangeModel extends BaseModel<Change> {
|
||||
userId,
|
||||
];
|
||||
|
||||
if (!doCountQuery) subParams1.push(limit);
|
||||
if (!doCountQuery) subParams1.push(subQueryLimit);
|
||||
|
||||
const subQuery2 = `
|
||||
SELECT ${fieldsSql}
|
||||
@ -185,7 +187,7 @@ export default class ChangeModel extends BaseModel<Change> {
|
||||
userId,
|
||||
];
|
||||
|
||||
if (!doCountQuery) subParams2.push(limit);
|
||||
if (!doCountQuery) subParams2.push(subQueryLimit);
|
||||
|
||||
let query: Knex.Raw<any> = null;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user