Skip to content

热力图选择性刷新优化 #102

Description

@oeyoews

可以对changedTiddlers做一个 过滤, 比如排除 $:/ 或者 Draft of 开头的条目, 因为tw的状态条目变化的很频繁,几乎每一个操作 都会导致 $:/status/xxx 条目变化, 引起不必要的刷新

ps: 热力图数据稍微多, 会引起明显的卡顿

  shouldUpdate: (_, changedTiddlers) => $tw.utils.count(changedTiddlers) > 0;
  shouldUpdate: (_, changedTiddlers) => {
    const filteredChangedTiddlers = Object.keys(changedTiddlers).filter(
      title => !(title.startsWith('$:/') || title.startsWith('Draft of')),
    );
    return filteredChangedTiddlers.length ? true : false;
  }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions