WikimapsAtlas / WikimapsAtlas-generator

A command line utility to convert heavy GIS sources into elegant administrative & topographic topojson files, raster files, and web friendly svg maps.
MIT License
45 stars 6 forks source link

Topographic.node.js : diagnostic speed bottleneck #19

Closed hugolpz closed 4 years ago

hugolpz commented 5 years ago

See :

WIDTH=1280 node topographic.node.js     # see inside this file for parameters' calls
### [object Object]
Period_0⟶1 : 0.030sec.          map function: defined
Period_0⟶1 : 0.03sec. (total) <-----------------------
Topo map, projected: Tue Nov 13 2018 00:13:10 GMT+0100 (CET)
[Mon, 12 Nov 2018 23:13:10 GMT] "GET /output/India/administrative.topo.json" "node-XMLHttpRequest"
[Mon, 12 Nov 2018 23:13:10 GMT] "GET /output/India/color.jpg.b64" "node-XMLHttpRequest"
[Mon, 12 Nov 2018 23:13:10 GMT] "GET /output/India/trans.png.b64" "node-XMLHttpRequest"
[Mon, 12 Nov 2018 23:13:10 GMT] "GET /output/India/waters.topo.json" "node-XMLHttpRequest"
[Mon, 12 Nov 2018 23:13:10 GMT] "GET /output/India/elevations.topo.json" "node-XMLHttpRequest"
Admin map, printed: Tue Nov 13 2018 00:13:14 GMT+0100 (CET)
Period_0⟶1 : 0.030sec.          map function: defined
Period_1⟶2 : 4.039sec.          map projection: done
Period_2⟶3 : 0.013sec.          _location_map,_admin-topographic_relief_(2018)-en.svg
Period_3⟶4 : 0.012sec.          #L0 fill-opacity:0.3
Period_4⟶5 : 0.010sec.          #L0 iso2.remove()
Period_5⟶6 : 0.026sec.          #L1 opacity:0.6
Period_6⟶7 : 0.009sec.          #L1>* opacity:0
Period_7⟶8 : 0.037sec.          html India_location_map,_admin-topographic_relief_(2018)-en.svg
Period_8⟶9 : 0.032sec.          xml India_location_map,_admin-topographic_relief_(2018)-en.svg
Period_0⟶9 : 4.208sec. (total) <-----------------------
Period_0⟶1 : 0.025sec.          Starting --------------------------------------- 
Period_0⟶1 : 0.025sec. (total) <-----------------------
### LoopL1, one L1 printed such as :
Period_0⟶1 : 63.136sec.          LoopL1 > Starting --------------------------------------- 
Period_1⟶2 : 0.000sec.          LoopL1 > for loop > Selector 1
Period_2⟶3 : 0.000sec.          LoopL1 > for loop > opacity
Period_3⟶4 : 58.892sec.          LoopL1 > for loop > c
Period_4⟶5 : 0.000sec.          LoopL1 > for loop > c is true
Period_5⟶6 : 0.000sec.          Printing (00:15:16):  1 ; area: 20.5363 ; name: Chandigarh
Period_6⟶7 : 0.008sec.          LoopL1 > ready to print !
Period_7⟶8 : 0.028sec.          LoopL1 > html, India,_Chandigarh_locator_map,_admin-topographic_relief_(2018)-en.svg
Period_8⟶9 : 0.030sec.          LoopL1 > xml, India,_Chandigarh_locator_map,_admin-topographic_relief_(2018)-en.svg
Period_9⟶10 : 0.009sec.          LoopL1 > fs.writeFileSync, India,_Chandigarh_locator_map,_admin-topographic_relief_(2018)-en.svg, #hook1
Period_10⟶11 : 0.019sec.          LoopL1 > #L1 > * opacity: 0 : done
Period_0⟶11 : 122.122sec. (total) <-----------------------
### LoopL1, one L1 printed such as :
Period_0⟶1 : 58.621sec.          LoopL1 > Starting --------------------------------------- 
Period_1⟶2 : 0.000sec.          LoopL1 > for loop > Selector 1
Period_2⟶3 : 0.000sec.          LoopL1 > for loop > opacity
Period_3⟶4 : 58.561sec.          LoopL1 > for loop > c
Period_4⟶5 : 0.000sec.          LoopL1 > for loop > c is true
Period_5⟶6 : 0.000sec.          Printing (00:17:13):  2 ; area: 249.772 ; name: Delhi
Period_6⟶7 : 0.010sec.          LoopL1 > ready to print !
Period_7⟶8 : 0.024sec.          LoopL1 > html, India,_Delhi_locator_map,_admin-topographic_relief_(2018)-en.svg
Period_8⟶9 : 0.027sec.          LoopL1 > xml, India,_Delhi_locator_map,_admin-topographic_relief_(2018)-en.svg
Period_9⟶10 : 0.007sec.          LoopL1 > fs.writeFileSync, India,_Delhi_locator_map,_admin-topographic_relief_(2018)-en.svg, #hook1
Period_10⟶11 : 0.018sec.          LoopL1 > #L1 > * opacity: 0 : done
Period_0⟶11 : 117.268sec. (total) <-----------------------
^Cd3.makefile:17: recipe for target 'topographic' failed
make: *** [topographic] Interrupt
hugolpz commented 4 years ago

As of 2020:

File processed 2018 period 2020 period
India_location_map,_admin-topographicrelief(20**)-en.svg Period_0⟶9 : 4.208sec. Period_0⟶9 : 4.187sec.
India,_Chandigarh_locator_map,_admin-topographicrelief(20**)-en.svg Period_0⟶11 : 122.122sec. Period_0⟶10 : 0.103sec.
India,_Delhi_locator_map,_admin-topographicrelief(20**)-en.svg Period_0⟶11 : 117.268sec. Period_0⟶10 : 0.089sec.
WIDTH=1280 node jsdom@16-topographic.node.js        # see inside this file for parameters' calls
wikiatlas.js
fsRead file:  /home/yug/Documents/projects_maps/make-modules-d/09_d3/../js/d3.v3.min.js
fsRead file:  /home/yug/Documents/projects_maps/make-modules-d/09_d3/../js/jquery-2.1.3.min.js
fsRead file:  /home/yug/Documents/projects_maps/make-modules-d/09_d3/../js/topojson.v1.min.js
fsRead file:  /home/yug/Documents/projects_maps/make-modules-d/09_d3/../js/queue.min.js
fsRead file:  /home/yug/Documents/projects_maps/make-modules-d/09_d3/../js/wikiatlas.js
fsRead file:  /home/yug/Documents/projects_maps/make-modules-d/09_d3/../js/b64.js
wikiatlas.js
/* JSDOM > Run page ******************************************************** */
1280 IN India 67.0 37.5 99.0 05.0 true undefined
locationMap()
pattern()
URLS: http://127.0.0.1:8080/output/India/administrative.topo.json undefined
Queue(): /* **************************************** */
Period_0⟶1 : 0.037sec.          map function: defined
Period_0⟶1 : 0.037sec. (TOTAL) -----------------------
Topo map, projected: Fri Sep 04 2020 11:07:39 GMT+0200 (Central European Summer Time)
[2020-09-04T09:07:39.213Z]  "GET /output/India/administrative.topo.json" "Mozilla/5.0 (linux) AppleWebKit/537.36 (KHTML, like Gecko) jsdom/16.4.0"
[2020-09-04T09:07:39.214Z]  "GET /output/India/color.jpg.b64" "Mozilla/5.0 (linux) AppleWebKit/537.36 (KHTML, like Gecko) jsdom/16.4.0"
[2020-09-04T09:07:39.215Z]  "GET /output/India/trans.png.b64" "Mozilla/5.0 (linux) AppleWebKit/537.36 (KHTML, like Gecko) jsdom/16.4.0"
[2020-09-04T09:07:39.216Z]  "GET /output/India/waters.topo.json" "Mozilla/5.0 (linux) AppleWebKit/537.36 (KHTML, like Gecko) jsdom/16.4.0"
[2020-09-04T09:07:39.216Z]  "GET /output/India/elevations.topo.json" "Mozilla/5.0 (linux) AppleWebKit/537.36 (KHTML, like Gecko) jsdom/16.4.0"
Layers & current: 7 // 0
Layers & current: 7 // 100
Layers & current: 7 // 200
Layers & current: 7 // 500
Layers & current: 7 // 1000
Layers & current: 7 // 2000
Layers & current: 7 // 5000
Topographic type: all
Topographic D3 range: #94BF8B,#EFEBC0,#AA8753,#FFFFFF
Topographic D3 domain:0,1.75,3.5,5.25
Period_0⟶1 : 0.004sec.          Wrote XML metadata (WNES, title)
Period_1⟶2 : 0.000sec.          Add patterns
Period_2⟶3 : 0.022sec.          Ready to load files
Period_3⟶4 : 0.111sec.          Loaded files
Period_4⟶5 : 0.053sec.          MakeMap() start! -----------
Period_5⟶6 : 0.000sec.          Define projection & transformed projection
Period_6⟶7 : 0.000sec.          Define minor meta (svg name)!-----------
Period_7⟶8 : 0.000sec.          Define drawing: -----------
Period_8⟶9 : 0.001sec.          Start drawing!-----------
Period_9⟶10 : 0.000sec.          Background
Period_10⟶11 : 0.224sec.          Relief_raster
Period_11⟶12 : 0.872sec.          L0
Period_12⟶13 : 0.357sec.          Elevations
Period_13⟶14 : 0.000sec.          L1
Period_14⟶15 : 0.066sec.          Hillshade_raster
Period_15⟶16 : 0.019sec.          Rivers
Period_16⟶17 : 0.033sec.          Lakes
Period_17⟶18 : 0.021sec.          Coasts
Period_18⟶19 : 0.029sec.          Disputed
Period_19⟶20 : 0.016sec.          L1_borders
Period_20⟶21 : 0.203sec.          L0_borders
Period_21⟶22 : 0.005sec.          L1_frames
Period_22⟶23 : 0.003sec.          Places_dots
Period_23⟶24 : 0.163sec.          Places_labels
Period_24⟶25 : 0.209sec.          L0_labels
Period_0⟶25 : 2.411sec. (total) <-----------------------
layers end
Admin map, printed: Fri Sep 04 2020 11:07:43 GMT+0200 (Central European Summer Time)
Period_0⟶1 : 0.037sec.          map function: defined
Period_1⟶2 : 4.016sec.          map projection: done
Period_2⟶3 : 0.019sec.          _location_map,_admin-topographic_relief_(2020)-en.svg
Period_3⟶4 : 0.027sec.          #L0 fill-opacity:0.3
Period_4⟶5 : 0.004sec.          #L0 iso2.remove()
Period_5⟶6 : 0.021sec.          #L1 opacity:0.6
Period_6⟶7 : 0.006sec.          #L1>* opacity:0
Period_7⟶8 : 0.019sec.          html India_location_map,_admin-topographic_relief_(2020)-en.svg
Period_8⟶9 : 0.038sec.          xml India_location_map,_admin-topographic_relief_(2020)-en.svg
Period_0⟶9 : 4.187sec. (TOTAL) -----------------------
Period_0⟶1 : 0.000sec.          Starting --------------------------------------- 
Period_0⟶1 : 0sec. (TOTAL) -----------------------
Period_0⟶1 : 0.000sec.          Starting --------------------------------------- 
Period_0⟶1 : 0sec. (TOTAL) -----------------------
Period_0⟶1 : 0.014sec.          LoopL1 > for loop > Selector 1 //SLOW
Period_1⟶2 : 0.001sec.          LoopL1 > for loop > opacity
Period_2⟶3 : 0.000sec.          LoopL1 > for loop > c
Period_3⟶4 : 0.010sec.          LoopL1 > for loop > c is true// SLOW 
Period_4⟶5 : 0.000sec.          LoopL1 > for loop > c is true
Period_5⟶6 : 0.000sec.          LoopL1 > Printing (11:07:43):  1 ; area: 20.5363 ; name: Chandigarh
Period_6⟶7 : 0.005sec.          LoopL1 > html, India,_Chandigarh_locator_map,_admin-topographic_relief_(2020)-en.svg
Period_7⟶8 : 0.016sec.          LoopL1 > xml, India,_Chandigarh_locator_map,_admin-topographic_relief_(2020)-en.svg
Period_8⟶9 : 0.046sec.          LoopL1 > fs.writeFileSync, India,_Chandigarh_locator_map,_admin-topographic_relief_(2020)-en.svg, #hook1
Period_9⟶10 : 0.011sec.          LoopL1 > #L1 > * opacity: 0 : done
Period_0⟶10 : 0.103sec. (TOTAL) -----------------------
Period_0⟶1 : 0.011sec.          LoopL1 > for loop > Selector 1 //SLOW
Period_1⟶2 : 0.000sec.          LoopL1 > for loop > opacity
Period_2⟶3 : 0.000sec.          LoopL1 > for loop > c
Period_3⟶4 : 0.010sec.          LoopL1 > for loop > c is true// SLOW 
Period_4⟶5 : 0.000sec.          LoopL1 > for loop > c is true
Period_5⟶6 : 0.000sec.          LoopL1 > Printing (11:07:43):  2 ; area: 249.772 ; name: Delhi
Period_6⟶7 : 0.006sec.          LoopL1 > html, India,_Delhi_locator_map,_admin-topographic_relief_(2020)-en.svg
Period_7⟶8 : 0.006sec.          LoopL1 > xml, India,_Delhi_locator_map,_admin-topographic_relief_(2020)-en.svg
Period_8⟶9 : 0.045sec.          LoopL1 > fs.writeFileSync, India,_Delhi_locator_map,_admin-topographic_relief_(2020)-en.svg, #hook1
Period_9⟶10 : 0.011sec.          LoopL1 > #L1 > * opacity: 0 : done
Period_0⟶10 : 0.089sec. (TOTAL) -----------------------