Open jmuff44xv opened 1 year ago
Sorry, I just remembered I also wanted to ask: Is it OK for uniqueId to contain letters, e.g., "usda123456789", or must it be numerical?
I was initially thinking the answer was "yes" because the examples showed the values being supplied between quotation marks, suggesting that the values were strings. But then I became confused/doubtful when I saw that some of the floating point numbers are also between quotes, e.g., "4.8".
I know I'm a bit late, but allow me to finally answer your questions 🙂
Why are some of the numbers typed as quoted strings while others are not? Is this intentional, or is there any significance to it?
There is no particular reason. In JavaScript it doesn't really matter whether you put numbers into strings or not.
Would the import functionality be able to accept 600,000 food records, or is that too much? Would searching that slow down the app too much?
Is it stored internally as a database? How many MiB or GiB would such a 600k-record database be, approximately?
I don't know if importing 600,000 items would work, but I think that's a bit too much. Waistline stores all data inside the indexedDB database of the WebView it's running in, and there is probably an upper limit for how much can be stored in there. But the only way to find out for sure if it works would be by trying it out...
Is it OK for uniqueId to contain letters, e.g., "usda123456789", or must it be numerical?
The uniqueId can include both letters and numbers. You could even put in special characters or emojis if you want 🥳
Regarding the last question in the FAQ,
https://github.com/davidhealey/waistline/blob/master/FAQ.md
"Do you plan to add support for the [XXX] online food database or API available in my country?",
Why are some of the numbers typed as quoted strings while others are not? Is this intentional, or is there any significance to it? e.g.:
The 57.0 is not in quotes, while the "4.8" is in quotes.
Would the import functionality be able to accept 600,000 food records, or is that too much? Would searching that slow down the app too much?
Is it stored internally as a database? How many MiB or GiB would such a 600k-record database be, approximately? Because, I figure, a database, like sqllite, would probably be bigger than the imported JSON file, for performance reasons.