0

I developed an API which parses the data from PDF. I used tabula-py for developing this API but it takes 4-5 sec on localhost which is much longer. For reducing response time I thought to use Azure-Function but it is taking much longer than localhost (9-10 sec), which is not expected.

For deploying it I used docker image(ACR for Azure) which I thought it will help me in scalability. Can anyone suggest me possible methods for reducing response time? Why does it take this much longer time in Azure Function (which is not expected)?

P.S. Azure Function is similar with AWS Lambda.

James Z
  • 12,209
  • 10
  • 24
  • 44

1 Answers1

1

tabula-py is a wrapper around tabula-java, which is written in Java. The latency you are seeing is the startup time of the Java virtual machine, which is started by the Python wrapper.

The optimal solution would be to build the API server in a language that runs in the JVM, like Java or Kotlin.