May 2016
Beginner to intermediate
446 pages
10h 7m
English
Our DISTAL application is certainly working, but its performance leaves something to be desired. While the selectCountry.py and selectArea.py scripts run quickly, it can take two seconds or more for the showResults.py script to complete. Clearly, this isn't good enough: a delay like this is annoying to the user but would be disastrous for the server if it started to receive more requests than it could process.
Adding some timing code to the showResults.py script soon shows where the bottleneck lies:
Calculating lat/long coordinate took 0.0110 seconds Identifying place names took 0.0088 seconds Generating map took 3.0208 seconds Building HTML page took 0.0000 seconds
Clearly, the map-generation process is the problem ...
Read now
Unlock full access