refactore: DeepClone関数をstructuredCloneに置き換え
What
- backendのDeepClone関数をstructuredCloneに置き換えた
Why
- #11103
Additional info (optional)
Checklist
- [x] 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
(何らかの理由でstructuredCloneを使ってない覚えがあった)
パフォーマンスが悪いとかだった気がする
フロントだけの問題だったかも(IndexedDBにVue Refの値を挿入するのに使いたかったがstructuredCloneだと代用にならなかったという話)
https://github.com/misskey-dev/misskey/pull/8098#issuecomment-1114144045
パフォーマンス
https://github.com/misskey-dev/misskey/issues/9937 どうなった?
パフォーマンス問題はソースコードに書いてあったわね
パフォーマンス問題はソースコードに書いてあったわね
ホントだ。見落としてました(というかファイルそのものを消すcommitも忘れていた)
https://github.com/misskey-dev/misskey/blob/61e7eb8ff1d7ef222e60b687090cca53a182efc3/packages/backend/src/misc/clone.ts#L1
Codecov Report
Merging #11107 (4f2d3d4) into develop (61e7eb8) will decrease coverage by
0.30%. The diff coverage is50.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%) |
:arrow_down: |
| ...ackend/src/core/entities/DriveFileEntityService.ts | 77.00% <100.00%> (-0.08%) |
:arrow_down: |