Comments (5)
Clover uses two kinds of file loading:
The first is Volley that is used to load thumbnails and json data. This works by loading the data into memory and when it's done loading put in in a file (cache/volley). Volley currently purges files from memory after the size has exceeded 8MB, and purges files from disk if that exceeds 10MB. Volley also limits the keeps the amount of files under 250. (250 thumbnails are almost always under 10MB).
And there is the FileCache. FileCache straight up loads files from the network to the disk, and does not keep the files into memory. FileCache is used when loading full size images. These images can get up to 8MB in size. Lower end devices cannot load these files into memory so that's why it is loading directly tot the disk. FileCache keeps the disk size under 50MB.
Now the total size shouldn't exceed 60MB, but due to a bug in Ion not keeping it's own cache down (Ion is used in FileCache) it may exceed 60MB. The current workaround is to purge the Ion cache on startup.
I'm going to remove Ion as a file loader and use something that loads files from the network and only that. I chose Ion initially because I wanted to load bitmaps with it too, but that's unnecessary now.
I'll keep this issue open until Ion is replaced and the cache size stays below 60MB.
from clover.
Thanks for the explanation. Although an option in the settings to disable disk caching altogether would be awesome, if you got the time 👍 keep it up!
from clover.
Disabling the disk caching is impossible. Why would you want it disabled?
from clover.
No writes to internal SD in my case prolongs the lifespan. Also, maybe caching in memory could be an option for devices with more RAM. Maybe adding a wrapper over the caching stuff that allows to choose either file cache or ram cache?
(Also no traces of 4chin on storage)
from clover.
Replaced the image loader with okhttp
from clover.
Related Issues (20)
- New post notification count isn't correct when user deleted his own post and didn't refresh the thread
- A new board was added to 4chan, /vrpg/, can't browse it HOT 2
- Share not working correctly
- Regression: Save files no longer save to site/board folders HOT 3
- Cannot update clover with internal updater
- ClassCastException: org.floens.chan.ui.captcha.e cannot be cast to org.floens.chan.ui.captcha.h.j
- IndexOutOfBoundsException: Index: 0, Size: 0
- NullPointerException: Attempt to invoke virtual method 'void org.floens.chan.ui.view.ThumbnailView.l(boolean)' on a nul...
- New Board Addition HOT 1
- Downloading image crashes the app after a long hang HOT 1
- Saving to SD card HOT 1
- Android 10/11 Gesture navigation on Pixel phones in the way of swiping thread and watchlist pages
- Downloaded File is Corrupted if another file with the same differently-cased name is present
- Next update? HOT 6
- Pharsing error
- Feature: Different save folders while batch download and single download
- Please Add Compatibility For Yuki.la
- 4ch New Captcha HOT 34
- Custom flags not working on 4chan boards
- Repository archived, alternatives available
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from clover.