07-20-2023, 10:25 AM
I really like Xml for saving data, but when does sqlite/database become the better option? eg, when the xml has more than _x_ items or is greater than _y_ MB?
I am coding an rss reader and I believe I made the wrong choice in using xml over a sqlite database to store a cache of _all_ the feeds items. There are some feeds which have an xml file of ~1mb after a month, another has over 700 items, while most only have ~30 items and are ~50kb in size after a _several_ months.
I currently have no plans to implement a cap because I like to be able to search through everything.
So, my questions are:
1. When is the overhead of sqlite/databases justified over using xml?
2. Are the **few large xml files** justification enough for the database when there are **a lot of small** ones, though even the small ones will grow over time? (a long _long_ time)
**updated** (more info)
Every time a feed is selected in the GUI I reload all the items from that feeds xml file.
I also need to modify the read/unread status which seems really hacky when I loop through all nodes in the xml to find the item and then set it to read/unread.
I am coding an rss reader and I believe I made the wrong choice in using xml over a sqlite database to store a cache of _all_ the feeds items. There are some feeds which have an xml file of ~1mb after a month, another has over 700 items, while most only have ~30 items and are ~50kb in size after a _several_ months.
I currently have no plans to implement a cap because I like to be able to search through everything.
So, my questions are:
1. When is the overhead of sqlite/databases justified over using xml?
2. Are the **few large xml files** justification enough for the database when there are **a lot of small** ones, though even the small ones will grow over time? (a long _long_ time)
**updated** (more info)
Every time a feed is selected in the GUI I reload all the items from that feeds xml file.
I also need to modify the read/unread status which seems really hacky when I loop through all nodes in the xml to find the item and then set it to read/unread.