JSON too slow in loop (or loops too slow in general)

Thanks. I did the same thing for the non-compiling java example in their JSBC reference years ago. Still waiting on that documentation update... :rofl:

I used the data api to import a five field table containing 8000 records in 9 seconds

For an accurate performance comparison, try doing the entire 5K+ dataset with all 39 fields. That's the only way to do an apples-to-apples comparison. Note also, that my approach is generic (not FMP dependent) and would thus work with any JDBC database vendor (FileMaker Oracle, SQL Server, MariaDB, MySQL, PostgreSQL, H2, ....).

Since FileMaker can't import JSON directly, I imported the data set initially into a database tool that can import JSON. I just exported that data back to CSV so you can read it into FMP and not have to do all the manual field entry.

I've attached the first 1,000 rows.

covid-history.csv.zip (76.4 KB)


Just the Java/JDBC processing loop (after downloading the JSON) that parses the JSON and writes those data (5,600+ rows, 39 fields) to Maria DB takes just .. 0.029 seconds!