Fokko commented on issue #1708:
URL: 
https://github.com/apache/iceberg-python/issues/1708#issuecomment-2676357552

   I already had [some 
concerns](https://github.com/apache/iceberg-python/pull/1453#discussion_r1903355988)
 about this. Do we know the API's upper limit?
   
   We could also wrap this in a method in the `pyarrow.py` with a LRU cache 
slapped on it:
   
   ```python
   @lru_cache(maxsize=32)
   def _cached_resolve_s3_region(bucket: str) -> str:
       from pyarrow.fs import resolve_s3_region
       return resolve_s3_region(bucket=bucket)
   ```
   
   The memory footprint is pretty small, and this will share the location of 
the bucket across `FileIO`s.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to