hughkli / Lookin

Free macOS app for iOS view debugging.
GNU General Public License v3.0
1.05k stars 174 forks source link

Support refreshing only displaying view nodes. 支持仅刷新可见视图节点 #37

Closed starFelix closed 6 months ago

starFelix commented 6 months ago

Currently, Lookin's view refresh mode is full refresh, but in reality, most of the view nodes are not in displaying. When there are a large number of view nodes, full refresh will lead to excessively long refresh times. Changes:

  1. Add a setting option for 'Refresh Mode', supporting the option to refresh only displaying view nodes.
  2. Support refreshing single view nodes.
  3. Expanding or collapsing the view tree will trigger a view refresh.

Actual tests show that it can improve loading speed by at least 90%.

目前Lookin的视图刷新模式是全量刷新, 但实际上大部分的视图节点并不会关注到. 在视图节点数量很多的时候, 全量刷新就会导致刷新时间过长. 变更内容:

  1. 新增"刷新模式"的设置项, 支持设置仅刷新可见视图节点.
  2. 支持对单个视图节点刷新
  3. 在视图树展开或折叠的时候会触发视图刷新.

实际测试可以提高至少90%的加载速度.

image