You are on page 1of 1

dk_geo_clusters_create comparison

Time %age improvement


Version Difference on previous
Run 1 Run 2 Run 3 Run 4 Run 5 Avg method
1 All points clustered and added to the database
for each zoom level 20.63768601 24.01337790 23.18378496 26.16332984 26.17512107 20.63768601
1.5 All points clustered for each zoom level, then
added to the database 20.25040388 23.87103891 25.16944790 26.14219713 23.99032497 20.25040388 1.88%
2 All points clustered only for greatest zoom
level, each subsequent pass clusters the 39.73%
clusters produced by the previous pass 12.20412183 14.19967198 14.62587094 15.01184106 14.60299277 12.20412183
3 child_ids only typecast to array on initial
retrieval of points from database instead of in
the clustering function. Altitude set to 'NULL' if
not set on database retrieval instead of when -0.38%
creating database write strings. All database
fields set into $clusters_by_id explicitly instead
of just adding $row 12.25086308 13.28926897 14.28171802 15.83913493 15.11779380 12.25086308
4 child_ids created in array instead of being -0.24%
typecast 12.28070688 12.42517400 14.17183399 16.32390594 15.46635413 12.28070688
5 database strings created using array and 0.76%
implode instead of string and substr 12.18688297 12.50313997 14.70038700 14.60509300 14.33198094 12.18688297
6 x and y co-ordinates set on database retrieval
instead of in the clustering function 2.872723103 2.923439980 3.232517004 3.991712093 3.895622015 2.872723103 76.43%
7 Haversine distance used instead of pixel -136.13%
distance 6.783244133 7.366943121 10.55968785 8.683240891 8.174839020 6.783244133
8 zoom stored in lookup table to eliminate
clusters that are the same at multiple zoom
levels
9
Points pre-clustered to calculate marker density

Page 1