xxabc3966
V2EX  ›  问与答

为什么 Selenium 里 chrome 去 get url 时,时间远超 firefox?

  •  
  •   xxabc3966 · Sep 27, 2017 · 1371 views
    This topic created in 3155 days ago, the information mentioned may be changed or developed.
    测试语句如下:

    In [13]: driver = webdriver.Chrome()

    In [14]: %time driver.get('http://www.baidu.com')
    CPU times: user 1.1 ms, sys: 1.07 ms, total: 2.17 ms
    Wall time: 3.47 s


    In [16]: firefox = webdriver.Firefox()

    In [17]: %time firefox.get('http://www.baidu.com')
    CPU times: user 1.08 ms, sys: 1.06 ms, total: 2.14 ms
    Wall time: 637 ms


    chrome 的 Wall time 远超过 firefox。这是什么原因啊?有什么优化的方法吗?
    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   4065 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 30ms · UTC 05:23 · PVG 13:23 · LAX 22:23 · JFK 01:23
    ♥ Do have faith in what you're doing.