-
Notifications
You must be signed in to change notification settings - Fork 30
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
Loading reddit thread list is extremely slow in some cases. #27
Comments
A cache sounds like a great idea. Really the only reason to dip into the browser history anyway is in case the user has also visited that page in their browser. At least in my case I very seldom have overlap between my non-reddit browsing and my reddit browsing. |
Ok, I will try to take a stab at this cache idea tomorrow. |
Another way to improve performance wrt this issue is loading less number of threads in one go. Less threads means less time to figure out if they are visited or not. OR We can load less threads (like 10 of them) and automatically populate upto 200 threads in batches of 10 threads at once. We can do this even if we have a cache. |
Curious if this has seen any movement in the past year. I also have chrome synced to my device (Nexus 5 w/4.4.2, stock, on T-Mobile) and find that performance is generally much worse recently. I'm not enough of a programmer to know if it is explicitly this issue, but it sounds like similar symptoms. |
I'd be fine if visited links weren't even marked if it meant pages loaded fast. As it is now, pages take actual minutes to load. |
You can download the apk here: https://gist.github.com/shobhitg/aa919c6d79b05f6ee85c But that is a build off my machine. It is not signed and all. If you have a build environment, then you simply have to comment one line: Whoever (maybe I) fixes it using a sqllite database, will have to follow the similar pattern that is being used for saved content. Posting the location for SavedContent for future reference: https://github.com/zagaberoo/diode/tree/master/src/in/shick/diode/saved Post your results in relation to performance. Note: You will see links visited, but that visited status would go away as soon as you change the page (by going to another sub or going to next page). |
Loading reddit thread list is extremely slow in some cases.
If happens when the main browser on the device has lots and lots of bookmarks and history.
On my tablet Asus TF201, I have synced it up with my Google account. And due to that all my chrome bookmarks are synced with the tablet. They are around 4000 bookmarks.
The slowness happens in the call DownloadThreadsTask class.
This code causes slowness:
Common.isClicked(mContext, ti.getUrl()) is used to query Content Resolver to check against browser's history and bookmarks if the url was already visited or not.
If I comment that out the performance improves exponentially. But ofcourse then I am not able to see indication if the reddit link was visited previously or not.
I don't know yet what the solution would be. Lets discuss.
One suggestion I would like to float is this: How about we maintain a temporary cache of urls visited from within App for about last 72 hours? And we check against the cache if the url was visited or not. Local cache would be fast. Typically all the content is pretty much rotated so fast on reddit, so it would never be the case that someone would click next 10 times and not be happy about not seeing the old links as visited.
The text was updated successfully, but these errors were encountered: