Closed zengchanghuan closed 2 weeks ago
In high-configuration apps, I can choose not to clear the cache, but in low-configuration apps, I can actively clear the cache.
Not sure what you mean by high/low-configuration apps, but we probably shouldn't expose a function to "clear" the cache. I think it's a bit more about the language/framework environment we are in --- if it's C, then why not? But it's dart/Flutter, it might be better to stick with something like cacheExtent
.
But wait.. are we only talking about FPDF_RenderPageBitmap
here? If so, we definitely do not want to expose Pdfium's caching logic..
For example, on older Android and iPad devices (possibly manufactured around 10 years ago), which have very limited operating space, when running on older iOS devices, the iOS system detects memory usage. If there isn't enough memory, the system will automatically clear the cache, which makes it appear as if the app has crashed.
I totally agree not to expose Pdfium's caching logic.
1.0.55 introduces certain memory consumption optimization. And there are several parameters that directly affects the memory consumption;
I think that clearing the cache explicitly degrades the viewer performance and you had better think the parameters explained above to control the cache behavior indirectly.
In high-configuration apps, I can choose not to clear the cache, but in low-configuration apps, I can actively clear the cache.