Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CPU占用,相册卡顿 #175

Closed
glamourzc opened this issue Jan 23, 2019 · 13 comments

Comments

Projects
None yet
4 participants
@glamourzc
Copy link

commented Jan 23, 2019

问题类型

Bug Report

PicGo的相关信息

Win10,PicGo 2.0.2

问题重现

相册卡顿,滑动时同时cpu占用严重

@Molunerfinn

This comment has been minimized.

Copy link
Owner

commented Jan 23, 2019

你是不是大图片或者GIF很多啊?以及你的图片总数有多少呢

@Molunerfinn

This comment has been minimized.

Copy link
Owner

commented Jan 23, 2019

相册页图片多,渲染起来因人而异,得看图片数量以及图片格式等,这个能优化的空间比较小,之后可能会加个virtual-list来提升性能,不过可能不会有太多提高

@glamourzc

This comment has been minimized.

Copy link
Author

commented Jan 23, 2019

图片只有48张,但是每次打开相册都会重新加载缩略图。1.6.x中不存在这个问题,挺快的。

@Molunerfinn

This comment has been minimized.

Copy link
Owner

commented Jan 23, 2019

可能是加了动画效果的原因

@Molunerfinn

This comment has been minimized.

Copy link
Owner

commented Jan 23, 2019

我回头看看吧,如果有必要可以加一个禁止动画效果的选项。先看看是什么原因。

@Molunerfinn

This comment has been minimized.

Copy link
Owner

commented Jan 24, 2019

下次更新应该相册页的CPU占用会低了。不过是有条件的:

  1. 初次打开的时候需要第一次加载图片和渲染,所以第一次可能会慢一点,加上有图片懒加载,所以往下滚动的时候第一次可能会有「卡」的感觉。这是正常的
  2. 第一次打开之后,后续只要窗口不关闭,再次回到相册页也不会重新加载图片了,相册页第一次打开之后会缓存起来。这样的话效果会好很多。
@Molunerfinn

This comment has been minimized.

Copy link
Owner

commented Jan 31, 2019

@glamourzc 2.0.3改善了相册页后续打开重新渲染的问题。不过我发现了一个问题就是多图情况下依然会带来滚动卡顿问题。由于页面结构变化很小,现在已经排除了是页面的问题,我怀疑是更新到2.0之后,底层Electron更新的问题。年后我会尝试把Electron版本降回1.8再看看效果。

@pictoken

This comment has been minimized.

Copy link

commented Feb 19, 2019

多图上传就会提示COOKIE失效 其实没有失效

@Molunerfinn

This comment has been minimized.

Copy link
Owner

commented Feb 19, 2019

@pictoken 我这边多图上传微博图床是没问题的。你要不要试试更新一下cookie?

@fantab01

This comment has been minimized.

Copy link

commented Mar 20, 2019

@Molunerfinn 啊......刚才一次性往阿里云oss上上传了五十张图片(每张1到2兆,无GIF),现在相册页面超级无敌卡啊,重启也是超级无敌卡,我忍着卡顿从顶部滚动到底然后再滚动回顶,按理说已经渲染完毕了,但还是超级......无敌卡.......

@Molunerfinn

This comment has been minimized.

Copy link
Owner

commented Mar 20, 2019

@fantab01 之后会看看具体原因,目前我感觉应该就是内存和渲染占太多了

@Molunerfinn

This comment has been minimized.

Copy link
Owner

commented Mar 26, 2019

之后更新的版本里会更新相册页的DOM结构,应该能减少不少卡顿的感觉,不过相册的图片的缩略图的处理逻辑也随之改变,有些图片可能会「失真」(比如被缩放、或者被压缩了),这是正常的,不影响点击后预览的效果。也是对提升性能后的一点妥协

@Molunerfinn

This comment has been minimized.

Copy link
Owner

commented Apr 16, 2019

2.1.1版本应该解决了这个问题了,可以更新看看。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.