shunping commented on PR #34818:
URL: https://github.com/apache/beam/pull/34818#issuecomment-2848010871

   Thanks for attempting to fix the issue. 
   
   I see you are trying to replace 
[`bucket.get_blob`](https://github.com/googleapis/python-storage/blob/v2.18.2/google/cloud/storage/bucket.py#L1184),
 called in 
[`_gcs_object`](https://github.com/apache/beam/blob/release-2.64/sdks/python/apache_beam/io/gcp/gcsio.py#L539),
 with 
[`blob.exists`](https://github.com/googleapis/python-storage/blob/v2.18.2/google/cloud/storage/blob.py#L644).
   
   I took a look at the two function calls.
   - 
[`bucket.get_blob`](https://github.com/googleapis/python-storage/blob/v2.18.2/google/cloud/storage/bucket.py#L1184)
     - calling `blob.reload` inherited from `_PropertyMixin` at 
https://github.com/googleapis/python-storage/blob/v2.18.2/google/cloud/storage/_helpers.py#L216
       - calling `client._get_resource` at 
https://github.com/googleapis/python-storage/blob/v2.18.2/google/cloud/storage/_helpers.py#L300
   - 
[`blob.exists`](https://github.com/googleapis/python-storage/blob/v2.18.2/google/cloud/storage/blob.py#L644)
     - calling `client._get_resource` at 
https://github.com/googleapis/python-storage/blob/v2.18.2/google/cloud/storage/blob.py#L734
   
   It seems that under the hood, both apis are calling the 
same`client._get_resource`, so I am not sure if the change could make any 
performance improvement here.
   
   Adding @cojenco and @andrewsg from GCS client library to chime in.


-- 
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: github-unsubscr...@beam.apache.org

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

Reply via email to