Repository navigation
Conversation
レビュアーガイドコメントレンダラーのリソースを明示的に破棄し、ライブコメントと仮想化キャッシュのサイズに上限を設け、後続の再試行をスケジュールする際に、まだ確定していない現在の分を kakolog が繰り返し取得することを防止することで、過剰なメモリ使用量を解消します。 コメントレンダラーのライフサイクルクリーンアップのシーケンス図sequenceDiagram
participant OverlayPage
participant CommentRenderer
participant NiconiComments
participant Canvas
OverlayPage->>CommentRenderer: new CommentRenderer(container, initialComments, format)
CommentRenderer->>NiconiComments: new NiconiComments(canvas, comments, options)
OverlayPage->>CommentRenderer: addComments(...comments)
OverlayPage->>CommentRenderer: destroy()
CommentRenderer->>NiconiComments: destroy()
CommentRenderer->>Canvas: remove and release dimensions
kakolog における現在の分の遅延再試行のシーケンス図sequenceDiagram
participant KakologManager
participant NiconicoAPI
participant MiyouAPI
participant RetryScheduler
KakologManager->>NiconicoAPI: fetch comments for chunk
KakologManager->>MiyouAPI: fetch comments for chunk
KakologManager->>KakologManager: set deferredOffsets when chunk reaches current minute
KakologManager->>RetryScheduler: hasPendingInitialSourceFetch()
RetryScheduler->>KakologManager: fetchWithLimit()
KakologManager->>KakologManager: isDeferredOffsetWaiting(state, offset)
KakologManager->>NiconicoAPI: retry after deferredUntil
コメントバッファと計測キャッシュのサイズ制限のフロー図flowchart TD
Comments[Live comments] --> Pending[getPendingLiveComments]
Processed[processedIds] --> Pending
Pending --> Render[Render only unprocessed comments]
Comments --> Prune[pruneCommentMeasurementCache]
Prune --> Cache[Retain measurements for visible comment row keys]
Cache --> Virtualizer[TanStack Virtualizer]
ファイル単位の変更
ヒントとコマンドSourcery の操作
エクスペリエンスのカスタマイズダッシュボード にアクセスして、次の操作を行えます。
ヘルプを利用する
Original review guide in EnglishReviewer's GuideFixes excessive memory usage by explicitly disposing comment renderer resources, bounding live-comment and virtualization caches, and preventing kakolog from repeatedly fetching the not-yet-finalized current minute while scheduling a later retry. Sequence diagram for comment renderer lifecycle cleanupsequenceDiagram
participant OverlayPage
participant CommentRenderer
participant NiconiComments
participant Canvas
OverlayPage->>CommentRenderer: new CommentRenderer(container, initialComments, format)
CommentRenderer->>NiconiComments: new NiconiComments(canvas, comments, options)
OverlayPage->>CommentRenderer: addComments(...comments)
OverlayPage->>CommentRenderer: destroy()
CommentRenderer->>NiconiComments: destroy()
CommentRenderer->>Canvas: remove and release dimensions
Sequence diagram for deferred kakolog current-minute retrysequenceDiagram
participant KakologManager
participant NiconicoAPI
participant MiyouAPI
participant RetryScheduler
KakologManager->>NiconicoAPI: fetch comments for chunk
KakologManager->>MiyouAPI: fetch comments for chunk
KakologManager->>KakologManager: set deferredOffsets when chunk reaches current minute
KakologManager->>RetryScheduler: hasPendingInitialSourceFetch()
RetryScheduler->>KakologManager: fetchWithLimit()
KakologManager->>KakologManager: isDeferredOffsetWaiting(state, offset)
KakologManager->>NiconicoAPI: retry after deferredUntil
Flow diagram for bounded comment buffer and measurement cacheflowchart TD
Comments[Live comments] --> Pending[getPendingLiveComments]
Processed[processedIds] --> Pending
Pending --> Render[Render only unprocessed comments]
Comments --> Prune[pruneCommentMeasurementCache]
Prune --> Cache[Retain measurements for visible comment row keys]
Cache --> Virtualizer[TanStack Virtualizer]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Sourceryによる概要
新たに利用可能になったコメントログの区間を正しく処理しながら、NicoJKのコメント再生で古いバッファーやレンダラーリソースが保持され続ける問題を防止します。
バグ修正:
機能強化:
テスト:
Original summary in English
Summary by Sourcery
Prevent NicoJK comment playback from retaining stale buffers and renderer resources while handling newly available comment-log intervals correctly.
Bug Fixes:
Enhancements:
Tests: