Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 722f629986b6bebd931d06602badd2e54fe0ec500450c526810c8c3aef7d8eb1
Ticket: f1393ca08145b870db79f613e419f2cbf2542d2e
https get to USGS server takes 75 seconds
User & Date: kjnash on 2020-07-24 07:15:54
Changes

  1. comment changed to:
    If you do "curl 'https://nationalmap.gov/epqs/pqs.php?x=-82.52016666666667&y=40.06791666666667&units=Feet&output=xml'" it returns right away.
    
    If in tclsh you do: 
    package require http
    package require tls
    http::register https 443 [list ::tls::socket -tls1 1]
    
    set url https://nationalmap.gov/epqs/pqs.php?x=-82.52016666666667&y=40.06791666666667&units=Feet&output=xml
    time {set token [::http::geturl $url]}
    
    it takes 75 seconds -- and with the correct result
    
    parray tcl_platform
    tcl_platform(byteOrder)     = littleEndian
    tcl_platform(engine)        = Tcl
    tcl_platform(machine)       = x86_64
    tcl_platform(os)            = Darwin
    tcl_platform(osVersion)     = 18.6.0
    tcl_platform(pathSeparator) = :
    tcl_platform(platform)      = unix
    tcl_platform(pointerSize)   = 8
    tcl_platform(threaded)      = 1
    tcl_platform(user)          = kvetter
    tcl_platform(wordSize)      = 8
    
  2. icomment:
    Is this still a problem?  On my system the timing was similar in Curl and Tcl.
    
    I am using http 2.9.1 and Tcl 8.7a4 (similar results for 8.6.10), tls 1.7.21, and libressl 3.1.3 on Linux x86_64.
    
    898666 microseconds per iteration
    
    
    $ time curl 'https://nationalmap.gov/epqs/pqs.php?x=-82.52016666666667&y=40.06791666666667&units=Feet&output=xml'
    <?xml version="1.0" encoding="utf-8" ?><USGS_Elevation_Point_Query_Service><Elevation_Query x="-82.52016666666667" y="40.06791666666667"><Data_Source>3DEP 1/3 arc-second</Data_Source><Elevation>958.1</Elevation><Units>Feet</Units></Elevation_Query></USGS_Elevation_Point_Query_Service>
    real    0m0.927s
    user    0m0.023s
    sys     0m0.010s
    
  3. login: "kjnash"
  4. mimetype: "text/plain"