By the way, one of the lessons I learned with Web API on PostgreSQL is that some operations in Gramps become extremely slow when network lag (even a few milliseconds) is added to a SQL request, because there is often the pattern
for handle in db.iter_person_handles():
    person = db.get_person_from_handle(handle)
    # other stuff
rather than
for person in db.iter_people():
    # other stuff
or analogously for other object types. With SQLite on a local hard drive, this does not make much difference, but it does for any type of network.
I would be willing to contribute to removing such performance bottlenecks.