alibaba / fish-redux

An assembled flutter application framework.
https://github.com/alibaba/fish-redux
Apache License 2.0
7.33k stars 843 forks source link

页面关闭后adapter未销毁? #481

Open XHL-study opened 5 years ago

XHL-study commented 5 years ago

1.页面关闭后adapter并没有被销毁,是我用法的问题吗。 2.我初始化的2000行数据,可以看到我没有做任何操作,i和j都在疯狂增长, 初始化20000行数据卡顿很明显。

final imgList = [
    "https://axure-file.lanhuapp.com/51d4ee7f-3a52-4abc-858b-1e4830d8a449__971f2b133fbcfdbb0d2a46bacb9ded46",
    "https://img.ivsky.com/img/tupian/pre/201901/25/shanyang.jpg",
    "https://img.ivsky.com/img/tupian/pre/201901/25/shanyang-001.jpg",
    "https://img.ivsky.com/img/tupian/pre/201901/25/shanyang-002.jpg",
    "https://img.ivsky.com/img/tupian/pre/201901/25/shanyang-003.jpg",
    "https://img.ivsky.com/img/tupian/pre/201901/25/shanyang-005.jpg",
    "https://img.ivsky.com/img/tupian/pre/201901/25/shanyang-006.jpg",
    "https://img.ivsky.com/img/tupian/pre/201901/25/shanyang-007.jpg",
    "https://img.ivsky.com/img/tupian/pre/201901/25/shanyang-008.jpg",
    "https://img.ivsky.com/img/tupian/pre/201901/25/shanyang-009.jpg",
  ];
  final List<NormalComponentState> list = List.generate(2000, (int index) {
    return NormalComponentState(
      id: "id_$index",
      icon: imgList[Random().nextInt(imgList.length) % imgList.length],
      introduction: "测试demo",
      title: "test$index",
      type: 0,
      date: "2019-09-23 14:07",
    );
  });
  ctx.dispatch(ListActionCreator.initData(list));

中间暂停了两次gif录制,期间没有做任何页面操作。 fluter_bug

zjuwjf commented 5 years ago

在这样的使用场景下 确认下是flutter的问题还是adapter的问题?

XHL-study commented 5 years ago

在这样的使用场景下 确认下是flutter的问题还是adapter的问题?

嗯,我不确定,在学习使用这个。 这是我的demo https://github.com/XHL-study/fish_redux_demo