I have a contract that stores some basic data about a person. It has about 4-5 variables. Each of these contracts is associated with a name.
Say I want to search for a
Person smart contract that belongs to Varun, then I can call every single contract, and query whether the it has that name stored or not. Now this is very in-efficient so instead I want to have a
CentralRegistry contract in which I can keep a basic mapping of the name vs the address of the contract it belongs to.
Every time a new contract is created, the name and address corresponding to it is appending to the mapping in the
CentralRegistry contract. If I have 10,000,000
Person contracts, is there any issue is storing a mapping that has 10million registry. Note each append to the mapping will be done in a separate transaction, and it will be probably done over several months.