How could I develop and deliver an offline library app with millions of images?

Prerequisite Information


Hello,

I am creating a macOS app that loads lots of information from an SQLite database to a table view.

The database has about a million of records in the table and each record has a field with the local path of an image.

The size of the database file is about 1 GB.

The size of the folder containing those images is about 17 GB.

Questions


What is the best and most efficient way possible to be able to create, bundle and distribute this app in the app store or any other place (preferably without having to download 18 GB) ?

I know that it would be a lot better by having it on a server and downloading it, but I want to make the app completely offline.
Answered by Claude31 in 654551022
I must miss something in your question.
  • You want user to get the full content.

  • It is 1 + 17 GB (unless you compress the images)

  • But you don't want user to download 18 GB

AFAIK, that's not possible (yes, Xcode is 12 GB though…)
https://developer.apple.com/forums/thread/659620
  • And you don't want to store data on a server for on request retrieval…

Note: I would take care of performance with a 1 M rows tableView.
Accepted Answer
I must miss something in your question.
  • You want user to get the full content.

  • It is 1 + 17 GB (unless you compress the images)

  • But you don't want user to download 18 GB

AFAIK, that's not possible (yes, Xcode is 12 GB though…)
https://developer.apple.com/forums/thread/659620
  • And you don't want to store data on a server for on request retrieval…

Note: I would take care of performance with a 1 M rows tableView.
Hello Claude31,

Thanks for the answer!

I have tried to compress it, and from 17 GB it went down to 12 GB (which still is too much).

The thing is, I cannot afford a server right now, and i didn't want the app to be dependent on this, so I think I will upload the files to a free cloud service (Google Drive maybe which has 15 GB free) and the first time the app opens, it will download the images as a zip, place them in the sandboxed user's directory, unzip it there and then grab the images from there.

As for the performance, I am not exactly sure how I will deal with that, but I think I will add some kind of pagination.
My point about performance was about user experience with a table of a million rows.

Scrolling would be nightmarish. Even with just 10 000 rows, going to bottom is really very tedious (not to say impractical).

So, just test with a similar number of very simple cells (just the row number as title) and see what you get…

How could I develop and deliver an offline library app with millions of images?
 
 
Q