G
G
g9052019-05-07 21:36:14
PHP
g905, 2019-05-07 21:36:14

How to speed up json parsing with a lot of nesting?

There is a json ~ 12mb in size. And it has 5 levels of nesting.
City
-Housing complex
-House
---Entrance
----Apartment The
file is taken via FTP and parsed into the database. It is parsed rather clumsily - foreach for each level of nesting. It takes about 10 minutes.
How can I speed up parsing? Any ways, for example, write a parser in C. Or run multiple foreach in parallel? What other tricks are there? More or less useful could not be googled. Thank you.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question