0
votes

I'm developing an app (with Python and Google App Engine) that requires to load some content (basically text) stored in a bucket inside the Google Cloud Storage. Everything works as expected but I'm trying to optimize the application performance. I have two different options: I can parse the content via the urllib library (the content is public) and read it or I can load the content using the cloudstorage library provided by Google. My question is: in terms of performance, which method is better?

Thank you all.

2
test it and see. 'under the hood' they must be doing roughly the same thing, perhaps cloudstorage code is already somewhat optimised saving you effort - Anentropic

2 Answers

2
votes

Use the cloud storage. URLLib has a lot of restrictions and quotas that are in addition to that you would incur using the cloud storage library. You also have more power, functionality and speed (as it makes internal calls) compared to urllib.

0
votes

They will likely be very close. the AppEngine cloud storage library uses the URL fetch service, just like urllib.

Nonetheless, like any performance tuning, I'd suggest measuring on your own.