The current reader incurs in very inefficient queries during tile extraction, causing it to wait more to locate tiles than to actually mosaick them. Against a 550GB GPKG, whole world satellite image coverage, the response times were in the order of the tens of minutes/hours for a single request.
Also, the file is opened and closed at every read, kill all sqlite cache support.
I've developed a number of changes to perform more efficient queries, keep the file open, and avoid reading extra tiles that are not contributing to the output. The result is the same sample geopackage now reads in milliseconds, up to a couple of seconds for the worst cases.