Forum

Thread tagged as: Question, Problem, Runway

Perch Import API Slow Performance

Hi

I have an import script using the new Import API, it basically looks like this:


Solution found so code removed...

It's importing a CSV which contains around 250 rows. Whatever I do to try an improve performance I don't seem to be getting anywhere - the script currently takes around 2 minutes to execute, which times out on my client's server.

I know loops are bad for performance, but I can't think of any other way of doing this - anyone got any suggestions for improving performance?

Thanks.

Jack Barber

Jack Barber 0 points

  • 4 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Data import is not supposed to be fast. Runway is actually optimised in the opposite direction - it's slow to write but fast to read.

Are you running it as a web request? I'm guessing so if you're talking about timeouts. I'd batch it down - do 20 records and then redirect to yourself with a counter on the URL.

Ok, thanks for the pointer Drew.