apple / apple/pir-service-example

[improvement] create separate usecase for icons

Open
#64 1 comment 1 reaction 0 assignees View on GitHub
enhancement
Dominant language
Swift
Stars
218
Forks
32
Avg merge
1d 10h
Merged PRs (30d)
5

Description

Currently each identity keeps it's icon embedded in [CallIdentity proto message](https://github.com/apple/live-caller-id-lookup-example/blob/c02640e7b4ac2577271a8b61cef39e939efb3b51/Sources/ConstructDatabase/protobuf/CallIdentity.proto#L50C3-L50C17).

Thus we need to add it's own icon copy to each identity even if it is the same icon (some generic business logo for example).

Our 33 GB identity DB grew to 904 GB after adding 1000000 copies of the same 63 KiB icon, which is not practical. Instead it could have been only 63 KiB + HE overhead.

Better solution may be the following: add image_id field to CallIdentity message which will be set to the corresponding row's keyword in icons usecase DB (net.example.lookup.icon for example).

This would enable backend to keep only one copy of the same image. Current solution simply not feasible for any large dataset (904 GB of RAM is just too many).

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the CallIdentity message in Sources/ConstructDatabase/protobuf/CallIdentity.proto and trace how the icons usecase database stores images. Define how an image_id would connect each identity to a single icon row, then verify that repeated icons are stored once while identity lookups still resolve the correct image.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
databases
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.