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

maxItemsCount is not user-definable | database lock exception #101

Closed
rigelhope opened this issue Jul 31, 2013 · 21 comments
Closed

maxItemsCount is not user-definable | database lock exception #101

rigelhope opened this issue Jul 31, 2013 · 21 comments

Comments

@rigelhope
Copy link

No description provided.

@David-Development
Copy link
Member

Yes and I think it shouldn't be user-definable because it's influencing the stability and performance of the app.

@rigelhope
Copy link
Author

so provide a sensible default but allow the user to change it?

@BernhardPosselt
Copy link
Member

@rigelhope can you elaborate what the exact problem is?

This sounds like it should not be an option but just handled better by default. Most of the time settings are not the solution to fix bugs.

@rigelhope
Copy link
Author

I'm migrating from google news, so that has something to do with my expectations.

I have high-traffic news sites on my feed list, but I don't check them constantly. if i don't diligently mark them as read they wind up squeezing out the feeds I'm actually more interested in keeping track of. The app apparently pulls feeds from oldest-to-newest, so i wind up not being up to date on the feeds that are most important for me.

This might be approached from a few different angles

  1. allow per-feed setting of max queued items, either in the news app itself or on the mobile app. this might also take the form of a folder that is not updated (on the app) by default, perhaps (though this may still be subject to the max Items restriction)
  2. set priority of feeds for the app, so that lower priority feeds get pulled later
  3. pull some or all feeds from newest to oldest (or perhaps allow that to be set somewhere)

I don't know what's easiest for you all as dev, but I'm interested to hear more.

thanks

@BernhardPosselt
Copy link
Member

So basically your problem is that you have a lot of feeds with very few interesting articles right?

There is currently no way to do this properly, I'd also refrain from deleting unread articles at a certain limit since you might miss an important/interesting article (the news app deletes old read and not starred articles by default so you dont have to worry about that). If you dont want to read it, simply hit the "Mark all read" button.

I think the solution for this is to change the news feed. For instance I read a tech site which had tons of articles that i didnt read, then I switched to a competing website and now I'm reading almost every article.

@rigelhope
Copy link
Author

no, my problem is that i want to have the sources i read, whether i am looking at them frequently or not, there in my list of feeds, with a reasonable sample of the most recent ones available for further reading. this was exactly how i used google reader for a number of years.

It's pretty much impossible to "keep up" with any major news site's feed, with dozens or hundreds of articles a day. and my goal is not to read every article. my goal is to have a centralized place for reading serialized things (including browsing/grazing) that interest me.

it's perfectly fine by me to mark or subset specific feeds that always get downloaded, and some that are only downloaded if i click on them. but either way, that requires greater user control over what is downloaded and what isn't.

i've tried tinytiny-rss already and that doesn't do it for me. this app, including the owncloud integration, is much more my speed, and i would like to stick with it. but if you know of a better option that i can control myself, i'm all ears. or, alternately, if there is some way i can help make this app closer to what i envision/want, then please let me know how. (unfortunately, i do not really know any java, and though i am eager to learn i am not sure i will be of much help in real terms.)

@BernhardPosselt
Copy link
Member

What about just scrolling down as much as you want to read and then hit the mark read button?

@BernhardPosselt
Copy link
Member

cc @jancborchardt

@rigelhope
Copy link
Author

  1. this would require an additional refresh, which can sometimes take quite a while.
  2. i seem to recall having tried this and was not been able to make it work -- still got some sort of message about the article limit, which is when i started to poke around in the code. i can investigate this more thoroughly and if need be, file a proper bug report.

@rigelhope
Copy link
Author

so, tried this (#2, above). in addition to being incredibly slow (~5min to give me back a prompt on a reasonably capable, recentish dual-core phone , and it looks like it needs a full refresh after setting large numbers of articles as read) i got a popup with something to the effect of "database is locked (error code 5)"

@David-Development
Copy link
Member

Everytime you sync all items which have changed on the server are getting synced. That means that all the items you have marked as read are changed on the server and they're synced then again. When did you get the message "database is locked" exactly? Are you debugging the code? (btw. in the debug mode the app is really slow).

@rigelhope
Copy link
Author

I am not debugging, just trying to run it normally.

I had just marked all as read inside a folder containing ~600 items. hang hang hang.went to another folder with several hundred, selected mark all as read, and it gave me the db locked message.

the desktop news app seems to be working just fine for me when i do things like mark all as read., FWIW.

@David-Development
Copy link
Member

hm.. okay. I think the app try's to execute the sql update statement all the time. And that's why the database is locked and it crashes then. I try to figure out where exactly the problem is and try to optimize the sql update stuff.

@BernhardPosselt
Copy link
Member

@David-Development theres an sqlite lock timeout which got "fixed" in owncloud core. you may want to look into that.

@David-Development
Copy link
Member

@Raydiation Thank you for the hint. Where can I find it?
I think the problem is that there is a foreach loop over all items which need to be marked as read and this causes a lock of the table.

@BernhardPosselt
Copy link
Member

its a setting i think when you instantiate the sqlite connection object most likely, you have to read up on that ;)

@jancborchardt
Copy link
Member

Ok, so what’s the actual problem here? Please edit the title and description of the original issue to state the problem instead of just being a feature request.

With ownCloud we don’t just add config options because one person requests them, because then we would end up with unmaintainable software full of settings which are useless for most people. Most of the time there is actually a better way to fix this. But for that we need to have the problem stated properly.

What I do agree with, if I understand the problem correctly, is that newer items should be prioritized so you definitely have the latest stuff in your feed. Like Twitter or Facebook first show the newest stuff, and then you can scroll down for more.

What is maxItemsCount now? Maybe it can intelligently adapt to different feeds? Like when there’s a high-volume feed with 5 posts a day vs one with only 1 post a week, the high-volume one would get a higher maxItemsCount. Be a bit flexible.

@David-Development
Copy link
Member

All unread items are shown always. The problem is, that when you've more than 1k items, all items except the unread ones are getting deleted. So when you have for example 1500 items, you can't download old (read) items. You have to read for example 600 items in order to free up space for 100 old (read) items.

In a future release I'm going to implement the database indexing (mentioned by @Raydiation in another issue, btw. thank you for the hint) stuff in order to increase the limit of items to store.

Also I'm going to improve the database lock bug.

@David-Development
Copy link
Member

"its a setting i think when you instantiate the sqlite connection object most likely, you have to read up on that ;)"

@Raydiation You mean this setting, right?
owncloud/core@0e55acc

@BernhardPosselt
Copy link
Member

Yes

@David-Development
Copy link
Member

I fixed the Database lock exception stuff.. #115
I'm not going to make the max items size user definable but probably I'm going to increase the max items count to 1,5k or 2k.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants