-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Diskstorage.swift:224 (fileManager.fileExists(atPath: filePath) 文件IO耗时导致卡顿 #2217
Comments
@meiyongsheng 感谢汇报这个问题。 暂时这个方法被安排在了主线程上调用,做 dispatch 应该可以缓解,但是可能会涉及到一些后向兼容的问题 (比如 另外,想要请教一下,大概是在多长时间内 (比如一个 main runloop?) 检查多少图片缓存会导致这个问题?如果数量太夸张且没有必要的话,是不是也可以考虑在 set image 或者 cache check 的地方稍微batch一下。 可能是我自己的使用场景比较局限,我们自己的项目从来没有在这里遇到性能问题。 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
onevcat你好,由于我们项目在使用Kingfisher的过程中多次遇到文件IO导致卡顿的问题,经过排查发现,因为在获取文件缓存对应的cache对象时,内部判断文件是否存在涉及IO消耗, 代码位置为 Diskstorage.swift:224 影响面比较大(我们的应用为国内TOP级别应用),请问一下这块有解决方案吗?
The text was updated successfully, but these errors were encountered: