Forum Discussion
Equitable distribution by shorter distance - Geolocation
to deepen the performance aspects (certainly the use of list.accumulate is not highly recommended), it is necessary to know:
the number of locations?
for each location how many managers? 10 to 15 managers, for example
for each location how many customers? 100 to 250 customers, for example
PS
What data did you test the code on and how long did it take?
what is a time you reasonably expect?
Anonymous
Searching on the net, i found this article,
I made the change in the code and it takes less time than before.
The data set I used for the test is about 300 records, the data is in the code in my previous answer
In my first test it took me more than 5 minutes for only 200 records...
Now I can process 1500 in 6 minutes.
I am still looking for improvements because in my final data set there are 33,000 records (every month it's increase) divided in 20 places each one has between 1 and 4 managers having each one on average 1,200 customers; I also have to do other transformations to get the final result, so I need the fastest code , plus I'm not a very patient person 😄