Replies: 5 comments
-
@teolemon That would mean extracting those product fields from the server:
That can be implemented in pure SQL with the following tables: create table offline_product(
id int autoincrement primary key,
barcode text unique key not null,
brands text,
name text);
create table offline_attribute(
id int autoincrement primary key,
text_id text unique key not null);
create table offline_product_attribute(
product_id int not null,
attribute_id int not null,
score real not null,
primary key (product_id, attribute_id)); Or something more compact, like a dedicated table with all the attributes as columns. The thing is, that's a good idea to cache tons of products locally, but you'll get very poor performances if you keep json there. What would a typical query be? We would be ignoring these ones:
|
Beta Was this translation helpful? Give feedback.
-
I'm about to start a new project called "fast food":
Creating a project aside sounds like a good idea to me:
|
Beta Was this translation helpful? Give feedback.
-
Note that @AshAman999 is working on this as part of his Google Summer of Code project: https://wiki.openfoodfacts.org/GSOC_2022_-_Offline_Smoothie |
Beta Was this translation helpful? Give feedback.
-
@teolemon @AshAman999 Oops, then I stop. |
Beta Was this translation helpful? Give feedback.
-
Per @AshAman999 's computation in #2447 All 2,4M barcodes
Products (everything including KP, compressed)
Images
107MB for 10k (front image) |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
What
Per @AshAman999 's computation in #2447
All 2,4M barcodes
Products (everything including KP, compressed)
Images
107MB for 10k (front image)
https://squoosh.app/editor
Part of
Beta Was this translation helpful? Give feedback.
All reactions