Skip to content

Commit

Permalink
Merge pull request #1148 from merico-dev/1145-low-performance-on-a-qu…
Browse files Browse the repository at this point in the history
…ery-with-360k-rows-of-data

1145 low performance on a query with 360k rows of data
  • Loading branch information
GerilLeto authored Aug 30, 2023
2 parents 7b76466 + 730f9b4 commit 75d91a8
Show file tree
Hide file tree
Showing 10 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion api/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@devtable/api",
"version": "10.23.1",
"version": "10.24.0",
"description": "",
"main": "index.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion dashboard/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@devtable/dashboard",
"version": "10.23.1",
"version": "10.24.0",
"license": "Apache-2.0",
"publishConfig": {
"access": "public",
Expand Down
2 changes: 1 addition & 1 deletion dashboard/src/dashboard-editor/model/content/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ const _ContentModel = types
};
}
return {
data: q.data.toJSON(),
data: q.data,
len: q.data.length,
state: q.state,
error: q.error,
Expand Down
2 changes: 1 addition & 1 deletion dashboard/src/dashboard-render/model/content.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ export const ContentRenderModel = types
};
}
return {
data: q.data.toJSON(),
data: q.data,
len: q.data.length,
state: q.state,
error: q.error,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export const PanelRenderModel = PanelMeta.views((self) => ({
},
get data() {
return this.queries.reduce((ret: TPanelData, q) => {
ret[q.id] = q.data.toJSON();
ret[q.id] = q.data;
return ret;
}, {});
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export const QueriesRenderModel = types
downloadAllData() {
const idDataList = self.current.map(({ name, data }) => ({
id: name,
data: data.toJSON(),
data,
}));
downloadDataListAsZip(idDataList);
},
Expand All @@ -39,7 +39,7 @@ export const QueriesRenderModel = types
.filter((q) => idset.has(q.id))
.map(({ name, data }) => ({
id: name,
data: data.toJSON(),
data,
}));
downloadDataListAsZip(idDataList);
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export const QueryRenderModel = types
MuteQueryModel,
types.model({
state: types.optional(types.enumeration(['idle', 'loading', 'error']), 'idle'),
data: types.optional(types.array(types.frozen<string[] | number[]>()), []),
data: types.optional(types.frozen<string[][] | number[][]>([]), []),
error: types.frozen(),
}),
)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@devtable/root",
"version": "10.23.1",
"version": "10.24.0",
"private": true,
"workspaces": [
"api",
Expand Down
2 changes: 1 addition & 1 deletion settings-form/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@devtable/settings-form",
"version": "10.23.1",
"version": "10.24.0",
"license": "Apache-2.0",
"publishConfig": {
"access": "public",
Expand Down
2 changes: 1 addition & 1 deletion website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@devtable/website",
"private": true,
"license": "Apache-2.0",
"version": "10.23.1",
"version": "10.24.0",
"scripts": {
"dev": "vite",
"preview": "vite preview"
Expand Down

0 comments on commit 75d91a8

Please sign in to comment.