increase export feature page size (#7341)

## Context
Now that we have improved performances, we can increase the export
feature page size from 30 to 200 (and probably above if results are
good). This should be ok since we are only querying the first level of
an object and omit relations.
I've moved this value to a constant.
This commit is contained in:
Weiko 2024-09-30 15:45:17 +02:00
parent 3ca31f95a7
commit 174801d71e
3 changed files with 5 additions and 2 deletions

View File

@ -0,0 +1 @@
export const EXPORT_TABLE_DATA_DEFAULT_PAGE_SIZE = 200;

View File

@ -2,6 +2,7 @@ import { json2csv } from 'json-2-csv';
import { useMemo } from 'react';
import { FieldMetadata } from '@/object-record/record-field/types/FieldMetadata';
import { EXPORT_TABLE_DATA_DEFAULT_PAGE_SIZE } from '@/object-record/record-index/options/constants/ExportTableDataDefaultPageSize';
import { useProcessRecordsForCSVExport } from '@/object-record/record-index/options/hooks/useProcessRecordsForCSVExport';
import {
useTableData,
@ -142,7 +143,7 @@ export const useExportTableData = ({
filename,
maximumRequests = 100,
objectNameSingular,
pageSize = 30,
pageSize = EXPORT_TABLE_DATA_DEFAULT_PAGE_SIZE,
recordIndexId,
viewType,
}: UseExportTableDataOptions) => {

View File

@ -9,6 +9,7 @@ import { ObjectRecord } from '@/object-record/types/ObjectRecord';
import { isDefined } from '~/utils/isDefined';
import { useRecordBoardStates } from '@/object-record/record-board/hooks/internal/useRecordBoardStates';
import { EXPORT_TABLE_DATA_DEFAULT_PAGE_SIZE } from '@/object-record/record-index/options/constants/ExportTableDataDefaultPageSize';
import { useRecordIndexOptionsForBoard } from '@/object-record/record-index/options/hooks/useRecordIndexOptionsForBoard';
import { ViewType } from '@/views/types/ViewType';
import { useFindManyParams } from '../../hooks/useLoadRecordIndexTable';
@ -43,7 +44,7 @@ export const useTableData = ({
delayMs,
maximumRequests = 100,
objectNameSingular,
pageSize = 30,
pageSize = EXPORT_TABLE_DATA_DEFAULT_PAGE_SIZE,
recordIndexId,
callback,
viewType = ViewType.Table,