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

refactore: DeepClone関数をstructuredCloneに置き換え #11107

Closed

Conversation

Umisyo
Copy link
Contributor

@Umisyo Umisyo commented Jul 4, 2023

What

  • backendのDeepClone関数をstructuredCloneに置き換えた

Why

Additional info (optional)

Checklist

  • Read the contribution guide
  • Test working in a local environment
  • (If needed) Add story of storybook
  • (If needed) Update CHANGELOG.md
  • (If possible) Add tests

Signed-off-by: Umisyo <kusunokisouta@gmail.com>
Signed-off-by: Umisyo <kusunokisouta@gmail.com>
@github-actions github-actions bot added the packages/backend Server side specific issue/PR label Jul 4, 2023
@tamaina
Copy link
Contributor

tamaina commented Jul 4, 2023

(何らかの理由でstructuredCloneを使ってない覚えがあった)

@syuilo
Copy link
Member

syuilo commented Jul 4, 2023

パフォーマンスが悪いとかだった気がする

@tamaina
Copy link
Contributor

tamaina commented Jul 4, 2023

フロントだけの問題だったかも(IndexedDBにVue Refの値を挿入するのに使いたかったがstructuredCloneだと代用にならなかったという話)

#8098 (comment)

@tamaina
Copy link
Contributor

tamaina commented Jul 4, 2023

パフォーマンス

#9937 どうなった?

@tamaina
Copy link
Contributor

tamaina commented Jul 4, 2023

パフォーマンス問題はソースコードに書いてあったわね

@Umisyo
Copy link
Contributor Author

Umisyo commented Jul 4, 2023

パフォーマンス問題はソースコードに書いてあったわね

ホントだ。見落としてました(というかファイルそのものを消すcommitも忘れていた)

// structredCloneが遅いため

@codecov
Copy link

codecov bot commented Jul 4, 2023

Codecov Report

Merging #11107 (4f2d3d4) into develop (61e7eb8) will decrease coverage by 0.30%.
The diff coverage is 50.00%.

@@             Coverage Diff             @@
##           develop   #11107      +/-   ##
===========================================
- Coverage    77.48%   77.19%   -0.30%     
===========================================
  Files          909      737     -172     
  Lines        91645    70140   -21505     
  Branches      7572     7046     -526     
===========================================
- Hits         71014    54144   -16870     
+ Misses       20631    15996    -4635     
Impacted Files Coverage Δ
packages/backend/src/core/RelayService.ts 80.80% <0.00%> (-0.16%) ⬇️
...ackend/src/core/entities/DriveFileEntityService.ts 77.00% <100.00%> (-0.08%) ⬇️

... and 190 files with indirect coverage changes

@Umisyo Umisyo closed this Jul 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
packages/backend Server side specific issue/PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants