Answer the question
In order to leave comments, you need to log in
How will it work faster and by how much?
There is a function that generates a set of random user data. With the number of iterations < 100, it still works all right, but most of all, it’s just slowly, slowly. The brake is that with each iteration there are 2 calls to the muscle. A region is selected based on the country_id, and a city is selected based on the country_id and region_id. There is an idea to make a selection from these tables immediately at the beginning of the function and access associative arrays in a loop. How much will it speed up the work?
Answer the question
In order to leave comments, you need to log in
It will speed up, of course, and much more. Weird question. The main thing is that there is not much data, otherwise your memory will overflow.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question