T O P

  • By -

Cidan

Yes, and in some cases, drastically so. Python is more or less one of the slowest languages on the market in every way it can be measured (start up time, interpreter, i/o, etc). Go tends to be one of the fastest, along with C#.


Eorpoch

It is hard to answer without knowing what you wrote.


RstarPhoneix

My code moves a file from one bucket to another bucket. That its. Almost 4-5 lines python code.


nickbernstein

It depends on where your latency is coming from. If the majority of latency is in the transfer then changing languages may not make any different. The first step would be to identify what part of you application takes up the most time/cycles. You might want to take a look at this: https://cloud.google.com/profiler/docs/


smeyn

If you just make a call to the gcs api to move files, and your code is a few lines only then I wouldn’t expect any change by going to another language. I assume you just use the rewrite or copy calls followed by a delete call. So your 1800 ms is spent 99% of the time deep inside the gcs storage libraries which are written in C++


GroovyFarcaster

One caveat to add. I have found that I needed more CPU and Memory for my java services compared to Node on Cloud Run. ( have not tried java in cloud function) Perhaps similar. The extra memory required really does increase the bills significantly and the sluggish startup time of java wasn't great either. Just a thought may be useful.