LoginSignup
0
0

List<>よりも、ImmutableList<>を使った方が、パフォーマンスが上がる

Posted at

Kotlin実装で学んだことの、自分用の覚え書きです。m(_ _)m

ポイント

  • List<>よりも、ImmutableList<>を使った方が、パフォーマンスが上がる

  • 可変であるList<>を使うと、更新したComposeのアイテム以外も再度作り直しが発生する
  • 全く変更がされない(読み取り専用)のImmutableList<>を使うと、変更が無かったComposeのアイテムの作り直しは発生しない
    (入力に変更が無ければスキップされるため)
  • ImmutableList<>の方が、無駄な再描画がかからないため、パフォーマンスがいい

参考サイト

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0