Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: improve memory usage of record export #311

Merged
merged 22 commits into from
May 10, 2023

Conversation

tasshi-me
Copy link
Member

@tasshi-me tasshi-me commented Apr 17, 2023

Why

#102

What

  1. fetch records by chunks and output them iteratively.

The basic design is the same as #218 .

How to test

yarn build
yarn test

node ./cli.js record export --app $APP_ID

Checklist

  • Read CONTRIBUTING.md
  • Updated documentation if it is required.
  • Added tests if it is required.
  • Passed yarn lint and yarn test on the root directory.

@tasshi-me tasshi-me marked this pull request as ready for review April 26, 2023 02:09
@tasshi-me tasshi-me requested a review from a team as a code owner April 26, 2023 02:09
@tasshi-me tasshi-me requested review from hung-cybo and removed request for a team April 26, 2023 02:09
src/record/import/usecases/__tests__/add/error.test.ts Outdated Show resolved Hide resolved
src/utils/error.ts Show resolved Hide resolved
src/record/export/index.ts Outdated Show resolved Hide resolved
src/utils/error.ts Outdated Show resolved Hide resolved
@tasshi-me tasshi-me force-pushed the feat/improve-memory-usage-of-export branch from ed424cb to 1766365 Compare April 27, 2023 10:05
@tasshi-me tasshi-me force-pushed the feat/improve-memory-usage-of-export branch from 23e2dac to 0a03e11 Compare April 27, 2023 18:39
Copy link
Member Author

@tasshi-me tasshi-me left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ueokande @hung-cybo
I updated the PR reflecting your reviews!

  • fix bug of CsvStrinfigier
  • update CliKintoneError and remove redundant implementation of toString()
  • make some fields of Repository private
  • apply no-unused-imports and remove unused imports

Copy link
Contributor

@hung-cybo hung-cybo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have some small comments.

@tasshi-me tasshi-me force-pushed the feat/improve-memory-usage-of-export branch from 05d323d to a181095 Compare May 9, 2023 01:46
@tasshi-me tasshi-me requested a review from ueokande May 9, 2023 01:53
@tasshi-me tasshi-me merged commit 1c545c7 into main May 10, 2023
10 checks passed
@tasshi-me tasshi-me deleted the feat/improve-memory-usage-of-export branch May 10, 2023 01:46
@tasshi-me
Copy link
Member Author

tasshi-me commented May 10, 2023

It works well.
memory-usage-during-export-en
comparison-of-peak-memory-usage-export-en

This was referenced Jan 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants