Giter Club home page Giter Club logo

Comments (9)

xpadev-net avatar xpadev-net commented on June 24, 2024

Firefox@Windows 11/8GBで試したところ、
いい感じにメモリを開放しているようで、全体で2GBくらいしか消費しなかった
しかし、途中でタブがクラッシュするため、どのみち制限は必須

from niconicomments.

xpadev-net avatar xpadev-net commented on June 24, 2024

基本的に弾幕はサイズと色が同じなので、
コメントごとに画像を生成するのではなく、コメントの内容ごとに画像を生成すれば
生成されるノード数を減らせるかも

from niconicomments.

xpadev-net avatar xpadev-net commented on June 24, 2024

image
Objectのノード数が60万近くあるため、timelineに保存するデータをコメントの表示開始タイミングのみに変更してノード数削減をしたほうがいいかもしれない
-> 1コメントあたりで300 -> 1に減らせるためかなり削減できると思われる
ソースコード確認したらtimelineにはコメントidしか格納してなかったからあまり変わらない
それに時間経過でメモリが増えるわけだからtimelineは関係ない

from niconicomments.

xpadev-net avatar xpadev-net commented on June 24, 2024

canvas elementを保管している変数をdeleteしてメモリが開放されるなら画像生成時にsettimeoutで3+a秒経過後に削除して、消えてたら再生成とかのほうがメモリには優しそう

from niconicomments.

xpadev-net avatar xpadev-net commented on June 24, 2024

image
パフォーマンスログを見る限りfill/stroke textはあまり負荷に影響していないので多少増やしても問題なさそう
メモリ問題さえ解消すれば快適に動くようになりそう

from niconicomments.

xpadev-net avatar xpadev-net commented on June 24, 2024

image

流星群の最初-最後通した際、物理メモリ16GBなのにfirefoxだけで40GB超え ワケガワカラナイヨ

from niconicomments.

xpadev-net avatar xpadev-net commented on June 24, 2024

ver 0.2.11で対応

from niconicomments.

xpadev-net avatar xpadev-net commented on June 24, 2024

弾幕は基本的に短期間にまとまって来るのでキャッシュとclearするtimeoutを内容をキーにして保持しておいて同じコメが流れたらtimeoutを更新するようにすれば弾幕周辺の処理を軽量化できそう

from niconicomments.

xpadev-net avatar xpadev-net commented on June 24, 2024

同一コメント、同一コマンドでキャッシュを再利用
cc0ec61 で対応

from niconicomments.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.